Skip to content

Commit

Permalink
Pass device type to message form
Browse files Browse the repository at this point in the history
  • Loading branch information
coderofstuff committed Dec 31, 2023
1 parent 07f05f5 commit 9170cc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/wallet/overview-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export default function OverviewTab(props) {
);
break;
case 'Message':
signSection = <MessageForm selectedAddress={selectedAddress} />;
signSection = (
<MessageForm selectedAddress={selectedAddress} deviceType={props.deviceType} />
);
break;
default:
break;
Expand Down
1 change: 1 addition & 0 deletions app/wallet/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ export default function Dashboard(props) {
setAddresses={setAddresses}
containerWidth={containerWidth}
containerHeight={containerHeight}
deviceType={deviceType}
/>
</Tabs.Panel>

Expand Down
7 changes: 6 additions & 1 deletion components/message-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ export default function MessageForm(props) {

try {
const path = props.selectedAddress.derivationPath.split('/');
const result = await signMessage(form.values.message, Number(path[3]), Number(path[4]), props.deviceType);
const result = await signMessage(
form.values.message,
Number(path[3]),
Number(path[4]),
props.deviceType,
);
setSignature(result.signature);

open();
Expand Down

0 comments on commit 9170cc9

Please sign in to comment.