telosnetwork / telos-bridge

The Telos LayerZero bridge enables seamless asset transfers between Telos and other blockchains
https://bridge.telos.net
5 stars 3 forks source link

Prevent 2x token approvals when requesting additional approval #111

Open rozzaswap opened 2 months ago

rozzaswap commented 2 months ago

Describe the bug Initial token approval if the user has a partial quantity allowance with the token for the bridge currently takes 2 transactions, one for 0 and another for the desired amount. Related to #110

Fix:

The bridge should figure out how large the allowance should be and request a transaction for that amount. The user is free to modify that on the wallet.