Skip to content

Commit

Permalink
fix error related to storage
Browse files Browse the repository at this point in the history
  • Loading branch information
constantindogaru committed Nov 26, 2021
1 parent b50d89a commit 4bde839
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified sputnikdao-factory2/res/sputnikdao_factory2.wasm
Binary file not shown.
Binary file modified sputnikdao2/res/sputnikdao2.wasm
Binary file not shown.
6 changes: 4 additions & 2 deletions sputnikdao2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ impl Contract {
// TBD: Do we need to remove this DAO? If so, we should delete this account and also send the
// locked amount to the dedicated account.

// TODO: fix self.get_available_amount() which is not reporting the right value
// Promise::new(config.dedicated_account).transfer(self.get_available_amount().0);
let locked_amount_for_storage =
env::storage_byte_cost() * (env::storage_usage() as u128);
let refund_amount = env::account_balance() - locked_amount_for_storage;
Promise::new(config.dedicated_account).transfer(refund_amount);
}

active
Expand Down

0 comments on commit 4bde839

Please sign in to comment.