diff --git a/contract-rs/Cargo.toml b/contract-rs/Cargo.toml index 6006d3d..a3e8193 100644 --- a/contract-rs/Cargo.toml +++ b/contract-rs/Cargo.toml @@ -17,7 +17,7 @@ near-sdk = "5.4.0" [dev-dependencies] near-sdk = { version = "5.4.0", features = ["unit-testing"] } -near-workspaces = { version = "0.11.0", features = ["unstable"] } +near-workspaces = { version = "0.14.1", features = ["unstable"] } tokio = { version = "1.12.0", features = ["full"] } serde_json = "1" diff --git a/frontend/package.json b/frontend/package.json index be472d2..af4dfeb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,7 +16,6 @@ "@near-wallet-selector/bitte-wallet": "^8.9.13", "@near-wallet-selector/core": "^8.9.13", "@near-wallet-selector/ethereum-wallets": "^8.9.13", - "@near-wallet-selector/here-wallet": "^8.9.13", "@near-wallet-selector/ledger": "^8.9.13", "@near-wallet-selector/meteor-wallet": "^8.9.13", "@near-wallet-selector/modal-ui": "^8.9.13", diff --git a/frontend/src/wallets/near.js b/frontend/src/wallets/near.js index 6a066ab..ad90f05 100644 --- a/frontend/src/wallets/near.js +++ b/frontend/src/wallets/near.js @@ -4,7 +4,6 @@ import '@near-wallet-selector/modal-ui/styles.css'; import { setupBitteWallet } from '@near-wallet-selector/bitte-wallet'; import { setupWalletSelector } from '@near-wallet-selector/core'; import { setupEthereumWallets } from '@near-wallet-selector/ethereum-wallets'; -import { setupHereWallet } from '@near-wallet-selector/here-wallet'; import { setupLedger } from '@near-wallet-selector/ledger'; import { setupMeteorWallet } from '@near-wallet-selector/meteor-wallet'; import { setupModal } from '@near-wallet-selector/modal-ui'; @@ -45,7 +44,6 @@ export class Wallet { network: this.networkId, modules: [ setupMyNearWallet(), - setupHereWallet(), setupLedger(), setupMeteorWallet(), setupSender(), @@ -167,8 +165,13 @@ export class Wallet { account_id: accountId, finality: 'final', }); - // return amount on NEAR - return account.amount ? Number(utils.format.formatNearAmount(account.amount)) : 0; + + // Format the amout and remove commas + const amountString = utils.format.formatNearAmount(account.amount); + const amount = Number(amountString.replace(/,/g, "").trim()); + + // Return amount in NEAR + return account.amount ? amount : 0; }; /**