Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladinlight committed Oct 18, 2023
1 parent 3ad7857 commit fbf8a6a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
5 changes: 2 additions & 3 deletions integration/src/wallets/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,13 @@ export class MockTransport extends ledger.LedgerTransport {
);

// Thorchain
const compress_pk = toByteArray("AxUZcTuLQr3DZxEtMxMs8Uzt+SisV3HURLpFm5SXEXuj");
this.memoize(
"Rune",
"getAddressAndPubKey",
JSON.parse(`[[${core.bip32ToAddressNList("m/44'/931'/0'/0/0")}], "thor"]`),
JSON.parse(
`{"success":true,"coin":"Rune","method":"getAddressAndPubkey","payload":{"bech32_address":"thor1ls33ayg26kmltw7jjy55p32ghjna09zp74t4az","compressed_pk":[${toByteArray(
"AxUZcTuLQr3DZxEtMxMs8Uzt+SisV3HURLpFm5SXEXuj"
)}]}}`
`{"success":true,"coin":"Rune","method":"getAddressAndPubkey","payload":{"bech32_address":"thor1ls33ayg26kmltw7jjy55p32ghjna09zp74t4az","compressed_pk":[${compress_pk}]}}`
)
);

Expand Down
15 changes: 8 additions & 7 deletions packages/hdwallet-ledger/src/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,6 @@ export class LedgerHDWallet
await this.validateCurrentApp(msg.coin);
return btc.btcGetAddress(this.transport, msg);
}
public thorchainGetAddress(msg: core.ThorchainGetAddress): Promise<string> {
return thorchain.thorchainGetAddress(this.transport, msg);
}

public thorchainSignTx(msg: core.ThorchainSignTx): Promise<core.ThorchainSignedTx> {
return thorchain.thorchainSignTx(this.transport, msg);
}

public async btcSignTx(msg: core.BTCSignTxLedger): Promise<core.BTCSignedTx> {
await this.validateCurrentApp(msg.coin);
Expand Down Expand Up @@ -527,6 +520,14 @@ export class LedgerHDWallet
return eth.ethVerifyMessage(msg);
}

public thorchainGetAddress(msg: core.ThorchainGetAddress): Promise<string> {
return thorchain.thorchainGetAddress(this.transport, msg);
}

public thorchainSignTx(msg: core.ThorchainSignTx): Promise<core.ThorchainSignedTx> {
return thorchain.thorchainSignTx(this.transport, msg);
}

public disconnect(): Promise<void> {
return this.transport.disconnect();
}
Expand Down

0 comments on commit fbf8a6a

Please sign in to comment.