Skip to content

Commit

Permalink
Merge pull request #12 from Into-the-Fathom/update-into-the-fathom-pr…
Browse files Browse the repository at this point in the history
…oviders
  • Loading branch information
TonioMacaronio authored Dec 20, 2023
2 parents 16f87fb + 627738a commit f3632c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/ethers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@into-the-fathom/networks": "^1.1.0",
"@into-the-fathom/pbkdf2": "^1.1.0",
"@into-the-fathom/properties": "^1.1.0",
"@into-the-fathom/providers": "^1.1.0",
"@into-the-fathom/providers": "^1.1.1",
"@into-the-fathom/random": "^1.1.0",
"@into-the-fathom/rlp": "^1.1.0",
"@into-the-fathom/sha2": "^1.1.0",
Expand Down Expand Up @@ -54,5 +54,5 @@
"sideEffects": false,
"tarballHash": "0x9ac4e262538b9d1283eb473881a925065c322d73e9299e306b5382de7ec04829",
"types": "./lib/index.d.ts",
"version": "1.1.0"
"version": "1.1.1"
}
2 changes: 1 addition & 1 deletion packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@
"sideEffects": false,
"tarballHash": "0xedcf6f4d62e2cbdf77766b1c41a9e0a31d1b2bf660c5b06715799748912b291a",
"types": "./lib/index.d.ts",
"version": "1.1.0"
"version": "1.1.1"
}
6 changes: 5 additions & 1 deletion packages/providers/src.ts/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class Formatter {

// Some clients (TestRPC) do strange things like return 0x0 for the
// 0 address; correct this to be a real address
if (transaction.to && BigNumber.from(transaction.to).isZero()) {
if (transaction.to && BigNumber.from(this.formatXdcPrefix(transaction.to)).isZero()) {
transaction.to = "0x0000000000000000000000000000000000000000";
}

Expand Down Expand Up @@ -439,6 +439,10 @@ export class Formatter {
return Formatter.check(this.formats.filter, value);
}

formatXdcPrefix(str: string): string {
return str.startsWith('xdc') ? '0x' + str.substring(3) : str;
}

filterLog(value: any): any {
return Formatter.check(this.formats.filterLog, value);
}
Expand Down

0 comments on commit f3632c3

Please sign in to comment.