Open
Description
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.
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.
Activity