Mint Refund
Once the user's previous transfer status is TRANSFER_TO_BE_REFUNDED, FE(front-end) needs to handle as follows to bring back user's assets to his/her wallet:
Polling GetTransferStatus until transfer status is TRANSFER_TO_BE_CONFIRMED
Submit on-chain withdraw request to cBridge OriginalTokenVault contract with information provided by cBridge gateway in getTransferStatus response
Once the refund transaction succeeds, the refund flow is complete.
Because of no slippage constraints, the possibility of deposit/mint flow failure is pretty low. Once mint flow failed with source chain deposit transaction, you will need to withdraw user's assets. The whole refund flow is the same as pool-based transfer flow. However, you should communicate with OriginalTokenVault contract for this refund
You should submit transaction to OriginalTokenVaultV2 if you interact with OriginalTokenVaultV2 for the previous transfer
Basically, it may take some time for gateway to prepare withdraw information. If the transfer status is stuck as TRANSFER_TO_BE_REFUNDED more than 30 minutes, you may contact our custom support
Last updated