Skip to content

Commit

Permalink
fix: use total attribute while checking storage balance
Browse files Browse the repository at this point in the history
  • Loading branch information
frolvanya committed Dec 20, 2024
1 parent 5b83f7c commit 343df38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl NearBridgeClient {

let storage_balance: Option<StorageBalance> = serde_json::from_slice(&response)?;

storage_balance.map_or(Ok(0), |balance| Ok(balance.available.as_yoctonear()))
storage_balance.map_or(Ok(0), |balance| Ok(balance.total.as_yoctonear()))
}

pub async fn get_required_balance_for_account(&self) -> Result<u128> {
Expand Down

0 comments on commit 343df38

Please sign in to comment.