Skip to content

Commit

Permalink
Merge branch 'feat/mv3-migration' into mv3-migration-build-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslovato authored Aug 9, 2024
2 parents 23b67ed + 86f17a5 commit cd703b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions source/pages/Send/Confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ export const SendConfirm = () => {
// SYSCOIN TRANSACTIONS
case isBitcoinBased === true:
try {
if (activeAccount.isTrezorWallet) {
await wallet.trezorSigner.init();
}
if (activeAccount.isLedgerWallet) {
await wallet.ledgerSigner.connectToLedgerDevice();
}
wallet.syscoinTransaction
.sendTransaction(
{ ...basicTxValues, fee: 0.00001 },
Expand Down
5 changes: 3 additions & 2 deletions source/pages/Settings/ConnectHardwareWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ const ConnectHardwareWalletView: FC = () => {
try {
switch (selectedHardwareWallet) {
case 'trezor':
await controller.wallet.importTrezorAccount(
await controller.wallet.trezorSigner.init();
await controller.wallet.importTrezorAccountFromController(
isBitcoinBased ? activeNetwork.currency : 'eth',
`${activeNetwork.currency === 'sys' ? '57' : slip44}`,
`${trezorAccounts.length}`
Expand All @@ -93,7 +94,7 @@ const ConnectHardwareWalletView: FC = () => {
}

if (webHidIsConnected) {
await controller.wallet.importLedgerAccount(
await controller.wallet.importLedgerAccountFromController(
isBitcoinBased ? activeNetwork.currency : 'eth',
`${activeNetwork.currency === 'sys' ? '57' : slip44}`,
`${ledgerAccounts.length}`,
Expand Down
4 changes: 2 additions & 2 deletions source/routers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export const Router = () => {
alert.removeAll();
// appRoute(pathname);
const isFullscreen = window.innerWidth > 600;
if (isFullscreen) {
if (isFullscreen && isUnlocked) {
navigate('/settings/account/hardware');
}
}, [pathname]);
}, [pathname, isUnlocked]);

useEffect(() => {
if (
Expand Down
4 changes: 2 additions & 2 deletions source/scripts/Background/controllers/MainController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ class MainController extends KeyringManager {
return importedAccount;
}

public async importTrezorAccount(
public async importTrezorAccountFromController(
coin: string,
slip44: string,
index: string
Expand Down Expand Up @@ -864,7 +864,7 @@ class MainController extends KeyringManager {
return importedAccount;
}

public async importLedgerAccount(
public async importLedgerAccountFromController(
coin: string,
slip44: string,
index: string,
Expand Down

0 comments on commit cd703b8

Please sign in to comment.