Skip to content

Commit

Permalink
Import encode from binary codec for XRPL & Xahau (mjs)
Browse files Browse the repository at this point in the history
  • Loading branch information
WietseWind committed Apr 19, 2024
1 parent 55dc3db commit cba95db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/ledger-live-common/src/hw/signTransaction/ripple.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import BinaryCodec from "xrpl-binary-codec-prerelease";
import { encode } from "xrpl-binary-codec-prerelease";
import Xrp from "@ledgerhq/hw-app-xrp";
import Transport from "@ledgerhq/hw-transport";
import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";

export default async (
currency: CryptoCurrency,
transport: Transport,
Expand All @@ -12,7 +13,7 @@ export default async (
const xrp = new Xrp(transport);
const { publicKey } = await xrp.getAddress(path);
tx.SigningPubKey = publicKey.toUpperCase();
const rawTxHex = BinaryCodec.encode(tx).toUpperCase();
const rawTxHex = encode(tx).toUpperCase();
tx.TxnSignature = (await xrp.signTransaction(path, rawTxHex)).toUpperCase();
return BinaryCodec.encode(tx).toUpperCase();
return encode(tx).toUpperCase();
};

0 comments on commit cba95db

Please sign in to comment.