Skip to content

Commit

Permalink
🐛 Add modal=send to ensure support for desktop linking (#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Balanced02 committed Oct 25, 2023
1 parent 6fe23bf commit 5a41d5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/modules/RequestToken/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default function RequestToken() {
const url = new Url('lisk://wallet');

const urlParams = {
modal: 'send',
recipient: currentAccount.metadata.address,
amount: amountValidity === 0 ? amount.value : 0,
recipientChain: recipientApplicationChainID,
Expand Down
5 changes: 3 additions & 2 deletions src/navigation/navigation.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ export function validateDeepLink(url) {

if (!foundLink) return false;

let queryParams = parsedUrl.query;
delete queryParams.modal;

const isSearchParamsValid = Object.keys(parsedUrl.query).every(
(key) => foundLink.validationSchema.properties[key]
);

if (!isSearchParamsValid) return false;

let queryParams = parsedUrl.query;

if (foundLink.paramsTransformer) {
queryParams = foundLink.paramsTransformer(parsedUrl.query);
}
Expand Down

0 comments on commit 5a41d5a

Please sign in to comment.