Skip to content

Commit

Permalink
Merge branch 'main' into feat/lw-9406-add-your-co-signers-component
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Araujo committed Feb 26, 2024
2 parents dbb615d + d8cc55a commit 118b6e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const createHardwareWallet = async ({

const addWalletProps: AddWalletProps<Wallet.WalletMetadata, Wallet.AccountMetadata> = {
metadata: { name },
type: WalletType.Ledger,
type: connectedDevice,
accounts: [
{
extendedAccountPublicKey: keyAgent.extendedAccountPublicKey,
Expand Down
2 changes: 1 addition & 1 deletion apps/browser-extension-wallet/src/lib/wallet-api-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
walletManagerChannel,
walletManagerProperties,
walletRepositoryProperties
} from '@cardano-sdk/web-extension';
} from '../../../../node_modules/@cardano-sdk/web-extension/dist/cjs';
import { Wallet } from '@lace/cardano';
import { firstValueFrom } from 'rxjs';
import { runtime } from 'webextension-polyfill';
Expand Down
2 changes: 1 addition & 1 deletion packages/cardano/src/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export {

export * as KeyManagement from '@cardano-sdk/key-management';
export * as Ledger from '@cardano-sdk/hardware-ledger';
export * as Trezor from '@cardano-sdk/hardware-trezor';
export * as Trezor from '../../../../node_modules/@cardano-sdk/hardware-trezor/dist/cjs';

export { HexBlob, Percent, BigIntMath } from '@cardano-sdk/util';
export * as Crypto from '@cardano-sdk/crypto';
Expand Down
6 changes: 3 additions & 3 deletions packages/cardano/src/wallet/lib/hardware-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as KeyManagement from '@cardano-sdk/key-management';
import { DeviceConnection, HardwareWallets } from '../types';
import * as HardwareLedger from '../../../../../node_modules/@cardano-sdk/hardware-ledger/dist/cjs';
import * as HardwareTrezor from '../../../../../node_modules/@cardano-sdk/hardware-trezor/dist/cjs';
import { TrezorKeyAgent } from '../../../../../node_modules/@cardano-sdk/hardware-trezor/dist/cjs';
import { WalletType } from '@cardano-sdk/web-extension';
// Using nodejs CML version to satisfy the tests requirements, but this gets replaced by webpack to the browser version in the build

Expand All @@ -25,13 +25,13 @@ const connectDevices: Record<HardwareWallets, () => Promise<DeviceConnection>> =
await HardwareLedger.LedgerKeyAgent.checkDeviceConnection(DEFAULT_COMMUNICATION_TYPE),
...(AVAILABLE_WALLETS.includes(WalletType.Trezor) && {
[WalletType.Trezor]: async () => {
const isTrezorInitialized = await HardwareTrezor.TrezorKeyAgent.initializeTrezorTransport({
const isTrezorInitialized = await TrezorKeyAgent.initializeTrezorTransport({
manifest,
communicationType: DEFAULT_COMMUNICATION_TYPE
});

// initializeTrezorTransport would still succeed even when device is not connected
await HardwareTrezor.TrezorKeyAgent.checkDeviceConnection(KeyManagement.CommunicationType.Web);
await TrezorKeyAgent.checkDeviceConnection(DEFAULT_COMMUNICATION_TYPE);

return isTrezorInitialized;
}
Expand Down

0 comments on commit 118b6e0

Please sign in to comment.