FreeosDAO / freeoscontracts

Freeos Smart Contract Code
0 stars 1 forks source link

Refund of XPR released immediately following unstake action #12

Closed judytan21 closed 3 years ago

judytan21 commented 3 years ago

Day 2 dummy run testing. Iteraction 4, vivvestin type 'e' account (Note: this account was used when testing vesting feature and hence did not comply to the naming convention for type 'e' account)

Issue: XPR was released straightaway instead of waiting for the dummy unstake time of 5 hours before releasing it to user.

  1. before unstaking,gitpod /workspace $ proton push action freeos333333 getuser '["vivvestin"]' -p vivvestin@active executed transaction: 851b2d3cb2bf6d628a3b0fc966cff8d3d8f9b4e221cc0b8b66ad769a5a5adec1  104 bytes  196 us

     freeos333333 <= freeos333333::getuser        {"user":"vivvestin"}

    account: vivvestin, registered: 1614550573, type: e, stake: 10.0000 XPR, staked-on: 1614558237, XPR: 39.0000 XPR, liquid: 268.0000 FREEOS, vested: 107.0000 FREEOS, airkey: 0 AIRKEY, iteration: 4, claimed: true

  2. run unstake action about 3:52pm gitpod /workspace $ proton push action freeos333333 unstake '["vivvestin"]' -p vivvestin@active executed transaction: 875a4d1c3d73552636af61f41818f4a49cf363634ab34b3a1c6477952135409a  104 bytes  431 us

     freeos333333 <= freeos333333::unstake        {"user":"vivvestin"}

    unstake requested

      eosio.token <= eosio.token::transfer        {"from":"freeos333333","to":"vivvestin","quantity":"10.0000 XPR","memo":"refund of freeos stake"}

     freeos333333 <= eosio.token::transfer        {"from":"freeos333333","to":"vivvestin","quantity":"10.0000 XPR","memo":"refund of freeos stake"}

        vivvestin <= eosio.token::transfer        {"from":"freeos333333","to":"vivvestin","quantity":"10.0000 XPR","memo":"refund of freeos stake"}

  3. After unstaking, a couple of mins later, about 3:54pm, check state of vivvestin, all 10 XPR was released to user. gitpod /workspace $ proton push action freeos333333 getuser '["vivvestin"]' -p vivvestin@active executed transaction: 69dfcd69001c0eef328537d210c82e7222a4ca2ce3182625369a2d40d17b1773  104 bytes  195 us

     freeos333333 <= freeos333333::getuser        {"user":"vivvestin"}

    account: vivvestin, registered: 1614550573, type: e, stake: 0.0000 XPR, staked-on: 0, XPR: 49.0000 XPR, liquid: 268.0000 FREEOS, vested: 107.0000 FREEOS, airkey: 0 AIRKEY, iteration: 4, claimed: true

tommccann777 commented 3 years ago

This has been fixed with version v0.327 which has been deployed. Requires retesting.