Skip to content

Commit

Permalink
fix(suite-native): connect popup use selected device
Browse files Browse the repository at this point in the history
  • Loading branch information
martykan committed Jan 20, 2025
1 parent f7ba450 commit 59e12ce
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ export const ConnectPopupScreen = ({
const { method, methodError } = useConnectMethod(popupOptions);

const callDevice = useCallback(async () => {
if (!popupOptions) return;
if (!popupOptions || !device) return;

setLoading(true);
// @ts-expect-error method is dynamic
const response = await TrezorConnect[popupOptions.method]({
...popupOptions.params,
device: {
path: device.path,
instance: device.instance,
state: device.state,
},
useEmptyPassphrase: device.useEmptyPassphrase,
});
setCallResult(response);
dispatch(deviceActions.removeButtonRequests({ device }));
Expand Down

0 comments on commit 59e12ce

Please sign in to comment.