aurora-is-near / rainbow-bridge-client

Monorepo containing Aurora-maintained libraries for using the Rainbow Bridge
https://github.com/near/rainbow-bridge-client/tree/main/packages/client#readme
MIT License
25 stars 7 forks source link

feat: skip approval if enough allowance + handle speedup/cancel #15

Closed paouvrard closed 3 years ago

paouvrard commented 3 years ago

This PR started out as adding getAllowance() to enable skipping the approve step if allowance is already enough.

Ended up adding support for canceled/speedup (dropped and replaced) transactions for https://github.com/near/rainbow-bridge-frontend/issues/136.

The two are cleanly separated in their own commit.

paouvrard commented 3 years ago

Thank you @chadoh for the detailed review. I've implemented refactoring and style changes. Please see this discussion here: https://github.com/near/rainbow-bridge-client/pull/15#discussion_r601746001 I don't believe we should change unlockHashes[] so I'm suggesting renaming the new transfer variables with an ethCache object