Skip to content

Commit

Permalink
deposits from UI working with new address decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding committed May 16, 2024
1 parent e2246c2 commit 11f5178
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Binary file modified bridge-frontend/.yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion bridge-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@web3-onboard/core": "^2.2.6",
"@web3-onboard/injected-wallets": "^2.0.5",
"@web3-onboard/react": "^2.1.5",
"bs58": "^5.0.0",
"@web3pack/base58-check": "^1.0.3",
"buffer": "^6.0.3",
"cacheable-request": "^10.2.7",
"ethers": "5.7.2",
Expand Down
4 changes: 2 additions & 2 deletions bridge-frontend/src/Transfers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Accordion } from "@chakra-ui/react";
import { Text } from "@chakra-ui/react";
import { Vouchers } from "./Vouchers";
import { EtherInput } from "./components/EtherInput";
import bs58 from "bs58";
import { decode as bs58decode } from '@web3pack/base58-check';

interface IInputPropos {
dappAddress: string;
Expand All @@ -47,7 +47,7 @@ export const Transfers: React.FC<IInputPropos> = (propos) => {
try {
if (rollups && provider) {
// parse the t-address into bytes we can send to the contract
let address_bytes = bs58.decode(destAddress);
let address_bytes = bs58decode(destAddress).subarray(2); // skip the first two bytes as they carry no information
const data = ethers.utils.arrayify(address_bytes);
const txOverrides = {
value: ethers.utils.parseEther(amount),
Expand Down
19 changes: 19 additions & 0 deletions bridge-frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7769,6 +7769,24 @@ __metadata:
languageName: node
linkType: hard

"@web3pack/base-x@npm:^1.0.1":
version: 1.0.2
resolution: "@web3pack/base-x@npm:1.0.2"
checksum: 10c0/ec7dbe9baa4a522e12c7ae3c80d047f843f1c37806be00897bf4e7301120cc69ebe569f9cf9941394bca22977634780d6d389703683c2e61a328037d5975de6c
languageName: node
linkType: hard

"@web3pack/base58-check@npm:^1.0.3":
version: 1.0.3
resolution: "@web3pack/base58-check@npm:1.0.3"
dependencies:
"@web3pack/base-x": "npm:^1.0.1"
buffer: "npm:^6.0.3"
hash.js: "npm:^1.1.7"
checksum: 10c0/b0a25c6afcef9590aabe1d0a5fc4867188ca21947ecae249f3e2401610545c5d9f1748e3d027572b9472c316f78569ff23e681bce993f61ce3e477c572b0e801
languageName: node
linkType: hard

"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5":
version: 1.11.6
resolution: "@webassemblyjs/ast@npm:1.11.6"
Expand Down Expand Up @@ -9474,6 +9492,7 @@ __metadata:
"@web3-onboard/core": "npm:^2.2.6"
"@web3-onboard/injected-wallets": "npm:^2.0.5"
"@web3-onboard/react": "npm:^2.1.5"
"@web3pack/base58-check": "npm:^1.0.3"
assert: "npm:^2.0.0"
bs58: "npm:^5.0.0"
buffer: "npm:^6.0.3"
Expand Down

0 comments on commit 11f5178

Please sign in to comment.