Skip to content

Commit

Permalink
[Issue 3275] Extension - Disable request connect from walletConnect w…
Browse files Browse the repository at this point in the history
…hen don't support substrate network #1
  • Loading branch information
Thiendekaco committed Jul 9, 2024
1 parent a475a3e commit ddbebd0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ const AccountExport = styled(Component)<Props>(({ theme: { token } }: Props) =>
'.json-done-description': {
padding: `0 ${token.controlHeightLG - token.padding}px`,
color: token.colorTextLabel,
textAlign: 'center',
fontSize: token.fontSizeHeading5,
textAlign: 'center',
lineHeight: token.lineHeightHeading5
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,10 @@ const Component: React.FC<Props> = (props: Props) => {
})
.catch((e: Error) => {
console.log(e);
notify({
message: e.message,
type: 'error'
});
setLoading(false);
});
});
}, [account.accountIndex, account.address, account.addressOffset, hashPayload, isLedgerConnected, isMessage, ledger, ledgerSignMessage, ledgerSignTransaction, notify, onApproveSignature, refreshLedger]);
}, [account.accountIndex, account.address, account.addressOffset, hashPayload, isLedgerConnected, isMessage, ledger, ledgerSignMessage, ledgerSignTransaction, onApproveSignature, refreshLedger]);

const onConfirmInject = useCallback(() => {
if (evmWallet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,6 @@ const Component: React.FC<Props> = (props: Props) => {
onApproveSignature({ signature });
} catch (e) {
console.error(e);
notify({
message: (e as Error).message,
type: 'error'
});
}

setLoading(false);
Expand Down
4 changes: 4 additions & 0 deletions packages/extension-koni-ui/src/hooks/ledger/useLedger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ export function useLedger (slug?: string, active = true, isSigning = false, forc
}, [getLedger, ledger, t]);

const signTransaction = useCallback(async (message: Uint8Array, metadata: Uint8Array, accountOffset?: number, addressOffset?: number, address?: string, accountOption?: Partial<AccountOptions>): Promise<LedgerSignature> => {
setError(null);

if (ledger) {
const addressOnCurrentLedger = await ledger.getAddress(false, accountOffset, addressOffset, accountOption);

Expand Down Expand Up @@ -255,6 +257,8 @@ export function useLedger (slug?: string, active = true, isSigning = false, forc
}, [handleError, ledger, t]);

const signMessage = useCallback(async (message: Uint8Array, accountOffset?: number, addressOffset?: number, address?: string, accountOption?: Partial<AccountOptions>): Promise<LedgerSignature> => {
setError(null);

if (ledger) {
const addressOnCurrentLedger = await ledger.getAddress(false, accountOffset, addressOffset, accountOption);

Expand Down

0 comments on commit ddbebd0

Please sign in to comment.