Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我们通过元掩码向智能合约创建交易并且用户没有确认它,它会保留在交易列表中,用户可以稍后发送它,或者在另一个选项卡中拒绝它。有什么方法可以检查交易是否被拒绝或仍在等待用户确认
您必须获取他/她发送金额的用户地址。然后继续侦听您的合同在过滤器中传递用户地址的付款事件。只有当金额从用户地址发送并且您可以在那里进行进一步处理时,这才会触发支付事件。
在 Metamask 中的“拒绝”后,您可以检查“错误”回调。“消息”字段将包含: - Metamask 的“用户拒绝交易签名” - Cipher 的“用户拒绝交易签名” - Toshi/Coinbase 的“无效消息正文” - 信任的“取消”