Skip to content

Commit

Permalink
swaps cbor lib for bignumber handling
Browse files Browse the repository at this point in the history
  • Loading branch information
netbonus committed Nov 5, 2024
1 parent 021d87d commit d95c571
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@
"bignumber.js": "^9.1.2",
"bitwise": "^2.2.1",
"bn.js": "^5.2.1",
"borc": "^3.0.0",
"bs58check": "^4.0.0",
"buffer": "^6.0.3",
"cbor": "^10.0.2",
"cbor-bigdecimal": "^10.0.2",
"crc-32": "^1.2.2",
"elliptic": "6.5.7",
"hash.js": "^1.1.7",
Expand Down
66 changes: 32 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { Chain, Common, Hardfork } from '@ethereumjs/common';
import { TransactionFactory } from '@ethereumjs/tx';
import BN from 'bignumber.js';
import cbor from 'borc';
import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util';
import { keccak256 } from 'js-sha3';
import { RLP } from '@ethereumjs/rlp';
Expand All @@ -22,6 +21,9 @@ import {
isAsciiStr,
splitFrames,
} from './util';
import cbor from 'cbor';
import bdec from 'cbor-bigdecimal';
bdec(cbor);

const buildEthereumMsgRequest = function (input) {
if (!input.payload || !input.protocol || !input.signerPath)
Expand Down

0 comments on commit d95c571

Please sign in to comment.