roke-to / roketo-contract

The Unlicense
4 stars 1 forks source link

Finance: unwrap NEAR at ft_transfer immediately #6

Closed Kouprin closed 2 years ago

Kouprin commented 2 years ago

Currently for transferring NEAR tokens we use wNEAR NEP-141 standardized wrapper instead (wrap.near). However we want to unwrap NEAR each time we send NEAR tokens to the receiver.

https://github.com/roke-to/roketo-contract/blob/master/finance/src/token.rs#L17

Basically, we want to check if the token_account_id is equal to wrapping contract. If so, we need to unwrap it and send unwrapped NEAR to the receiver instead of sending wrapped ones.

Kouprin commented 2 years ago

done in 4d582dde5a02aa01199b2634a7ab3450f435642e