Skip to content

Commit

Permalink
remove redundant range checks
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed May 29, 2024
1 parent 02cfee8 commit b2df0a1
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pages/wallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,6 @@ const shield = async () => {
if (incogniteeStore.vault) {
const balance = accountStore.paseoBalance;
const amount = Math.pow(10, 10) * shieldAmount.value;
if (balance - amount < existential_deposit_paseo) {
alert(
"Your PAS balance would fall below the existential deposit. Please obtain more PAS from the faucet",
);
txStatus.value = "";
return;
}
console.log(`sending ${amount} to vault: ${incogniteeStore.vault}`);
const wsProvider = new WsProvider("wss://rpc.ibp.network/paseo");
const api = await ApiPromise.create({ provider: wsProvider });
Expand All @@ -437,13 +430,6 @@ const unshield = () => {
txStatus.value = "⌛ will unshield to L1";
const balance = accountStore.incogniteeBalance;
const amount = Math.pow(10, 10) * unshieldAmount.value;
if (amount < existential_deposit_paseo) {
alert(
"Your PAS balance would fall below the existential deposit. Please obtain more PAS from the faucet",
);
txStatus.value = "";
return;
}
const signer = accountStore.account;
console.log(
`sending ${formatBalance(amount)} from ${
Expand All @@ -468,8 +454,6 @@ const unshield = () => {
const sendPrivately = () => {
console.log("sending funds on incognitee");
txStatus.value = "⌛ sending funds privately on incognitee";
const balance = accountStore.incogniteeBalance;
const amount = Math.pow(10, 10) * sendAmount.value;
const signer = accountStore.account;
console.log(
Expand Down

0 comments on commit b2df0a1

Please sign in to comment.