Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Mar 14, 2023
1 parent 6592aed commit 0b1925b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions packages/bridge-ui/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@
const txs = await $transactioner.GetAllByAddress(userAddress);
console.log(txs);
// const hashToApiTxsMap = new Map(apiTxs.map((tx) => {
// return [tx.hash, tx];
// }))
Expand All @@ -167,16 +166,12 @@
const updatedStorageTxs: BridgeTransaction[] = txs.filter((tx) => {
const blockInfo = blockInfoMap.get(tx.fromChainId);
console.log('blockinfo', blockInfo.latestProcessedBlock);
console.log('blockNUmber', tx.receipt.blockNumber);
if (blockInfo?.latestProcessedBlock >= tx.receipt.blockNumber) {
return false;
}
return true;
});
console.log(updatedStorageTxs);
$transactioner.UpdateStorageByAddress(userAddress, updatedStorageTxs);
transactions.set([...updatedStorageTxs, ...apiTxs]);
Expand Down
6 changes: 2 additions & 4 deletions packages/bridge-ui/src/components/form/BridgeForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,8 @@
try {
loading = true;
if (requiresAllowance) throw Error('requires additional allowance');
if (showTo) {
if (!ethers.utils.isAddress(to)) {
throw Error('Invalid custom recipient address');
}
if (showTo && !ethers.utils.isAddress(to)) {
throw Error('Invalid custom recipient address');
}
const amountInWei = ethers.utils.parseUnits(amount, $token.decimals);
Expand Down

0 comments on commit 0b1925b

Please sign in to comment.