icon |
---|
hand-pointer |
This section introduces common design patterns for integrating dryRunPlus into wallet applications.
Return Data Structure
export interface Response {
dryRun: DryRunTransactionBlockResponse;
pass: boolean;
msg: String | undefined;
}
When no transaction risks are identified, the pass
value is true
, and the wallet displays the DryRunTransactionBlockResponse
information normally.
Normal Transaction
When transaction risks are identified, the pass
value is false
, and there are two patterns for intercepting user transaction signatures.
Pattern 1
Display the risk information in the transaction, that is, Response.msg
. Change the transaction signature button to a warning color, such as red.
Pattern 2
Display the risk information in the transaction, that is, Response.msg
. Change the transaction signature button to gray and make it unusable. If the user insists on trusting the transaction, they can first disable dryRunPlus
by using the switch button.