Generate deep links to the DNA app for quick actions like Swap and Send.DNA now supports a Quick Action to deeplink directly
into the wallet interface, allowing users to perform specific actions like sending tokens or swapping assets with predefined parameters.
Ensure that the amount is specified in the unit of the fromToken (e.g., wei for Ethereum-based tokens).
The sourceDeeplinkPath is URL-encoded to ensure it is correctly interpreted when the deeplink is accessed.
The DNA_APP_ID should be defined in your environment to match the application ID assigned to your DNA instance.
If the tab is Send, it is necessary/recommended to provide fromToken, amount, and the recipient’s address or username(toToken is not required).
If the tab is Swap, it is necessary/recommended to provide fromToken, toToken, and amount(in base unit).
This function facilitates the creation of deeplink URLs that can be used to direct users seamlessly into specific actions within the DNA application, enhancing the user experience by pre-filling transaction details.