Skip to content

Commit

Permalink
fix(wallet): Encode nonces as base64 on redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
tifrel committed Aug 5, 2024
1 parent 8a93211 commit 5f046e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wallet/src/mintbase-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const MintbaseWallet: WalletBehaviourFactory<

const newUrl = new URL(`${metadata.walletUrl}/sign-message`);
newUrl.searchParams.set('message', message);
newUrl.searchParams.set('nonce', nonce);
newUrl.searchParams.set('nonce', Buffer.from(nonce).toString('base64'));
newUrl.searchParams.set('recipient', recipient);
newUrl.searchParams.set('callbackUrl', cbUrl);
window.location.assign(newUrl.toString());
Expand All @@ -230,7 +230,7 @@ export const MintbaseWallet: WalletBehaviourFactory<
newUrl.searchParams.set('accountId', accountId);
newUrl.searchParams.set('publicKey', publicKey);
newUrl.searchParams.set('signature', signature);
newUrl.searchParams.set('nonce', nonce);
newUrl.searchParams.set('nonce', Buffer.from(nonce).toString('base64'));
newUrl.searchParams.set('recipient', recipient);
newUrl.searchParams.set('callbackUrl', callbackUrl);

Expand Down

0 comments on commit 5f046e5

Please sign in to comment.