Configure user-facing transaction confirmation dialogs
Permission prompts give applications the option to show users a Para-managed dialog to manually approve or deny any transaction or message signing events.
This feature is required when interacting with wallets created outside your app, but can also be enabled for all wallets/transactions in your application. We recommend enabling this feature if you prefer not to implement transaction approval/display flows, or if you want users to explicitly approve every transaction on an embedded wallet.
Permission prompts are mandatory in the following scenarios:
To enable permission prompts for all transactions/wallets, activate “Always show transaction prompts” for your API key in the
When a transaction or message signing event is initiated, users will see a popup containing the following details:
From
: The wallet address initiating the transaction.To
: The recipient wallet address.Amount
: The number of tokens being transferred.Action
: The specific action being performed (e.g., token transfer, minting an NFT).Conversion Rates
: Relevant exchange rates if applicable.Chain Information
: Information about the blockchain being used.This feature is enabled by default when using the signMessage
or signTransaction
functions, either directly or
through supported signer libraries (e.g., Ethers, Cosmos).
There is a default 30-second timeout for approvals. If this does not work for your use case, please reach out to the Para team for instructions on overriding this value.
signMessage/signTransaction
function will return a SuccessfulSignatureRes
result, which will contain the signature.TransactionReviewError
will be thrown that includes the transactionReviewUrl
that must be handled by the implementing application.When implementing permission prompts, various errors can arise during the signing process. It’s important to handle these errors gracefully to ensure a smooth user experience. Below are common scenarios and recommended handling strategies:
Description: The user denies the transaction or message signing request.
Error Handling:
Description: The user does not respond to the popup within the configured timeout period. This returns additional
properties of transactionReviewUrl
and pendingTransactionId
:
pendingTransactionId
- Can be used in conjunction with the getPendingTransaction
function available via the
CorePara class (or WebPara, by extension). If it does not exist, that means the user has denied the transaction
request.transactionReviewUrl
- Can be used to open a popup if desired, which will present the user with the sign message /
transaction popup.Error Handling:
To learn more about signing messages and transactions, check out the following guides: