Skip to content

Commit 604f800

Browse files
committed
make ripple-binary-code a direct dependency of CWC
1 parent eb99c1c commit 604f800

3 files changed

Lines changed: 65 additions & 87 deletions

File tree

packages/crypto-wallet-core/package-lock.json

Lines changed: 59 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/crypto-wallet-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"ed25519-hd-key": "^1.3.0",
3737
"ethers": "6.13.5",
3838
"info": "0.0.6-beta.0",
39+
"ripple-binary-codec": "^1.10.0",
3940
"web3": "1.4.0",
4041
"xrpl": "2.13.0"
4142
},

packages/crypto-wallet-core/src/transactions/xrp/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { createHash } from 'crypto';
2+
import * as RBC from 'ripple-binary-codec';
3+
import * as binary from 'ripple-binary-codec/dist/binary';
4+
import { HashPrefix } from 'ripple-binary-codec/dist/hash-prefixes';
25
import * as xrpl from 'xrpl';
3-
import * as RBC from 'xrpl/node_modules/ripple-binary-codec';
4-
import * as binary from 'xrpl/node_modules/ripple-binary-codec/dist/binary';
5-
import { HashPrefix } from 'xrpl/node_modules/ripple-binary-codec/dist/hash-prefixes';
66
import { BTCTxProvider } from '../btc';
77
import type { Key } from '../../types/derivation';
88

@@ -88,7 +88,7 @@ export class XRPTxProvider {
8888
return this.sha512Half(prefix + tx);
8989
}
9090

91-
applySignature(params: { tx: string; signature: string; pubKey: string; }): string {
91+
applySignature(params: { tx: string; signature: string; pubKey: string }): string {
9292
const { tx, signature, pubKey } = params;
9393
const txJSON = (xrpl.decode(tx) as any) as xrpl.Transaction;
9494
txJSON.TxnSignature = signature;
@@ -111,7 +111,7 @@ export class XRPTxProvider {
111111
.slice(0, 64);
112112
}
113113

114-
transformSignatureObject(params: { obj: any; }) {
114+
transformSignatureObject(params: { obj: any }) {
115115
const { obj } = params;
116116
return new BTCTxProvider().transformSignatureObject({ obj });
117117
}

0 commit comments

Comments
 (0)