Open marco-sundsk opened 2 years ago
If user call swap or execute_actions with some near attatched, the contract now does not count them into user's storage deposited nor refund them. When the amonut is large, it would cause much trouble for user to re-claim them back.
swap
execute_actions
The fix may be like this:
#[payable] pub fn execute_actions( ... ... if env::attached_deposit() == 0 { ... ... } else { account.near_amount += env::attached_deposit(); } ... ... }
Then, user can call storage_withdraw to re-claim unused deposited near back by himself.
storage_withdraw
If user call
swap
orexecute_actions
with some near attatched, the contract now does not count them into user's storage deposited nor refund them. When the amonut is large, it would cause much trouble for user to re-claim them back.The fix may be like this:
Then, user can call
storage_withdraw
to re-claim unused deposited near back by himself.