multiversx / mx-sdk-js-web-wallet-provider

Signing provider for dApps: MultiversX (Web) Wallet.
Other
0 stars 1 forks source link

Make data field optional #29

Closed arhtudormorar closed 10 months ago

arhtudormorar commented 10 months ago

This is a valid link: http://localhost:3000/dashboard?signSession=1699434437543&nonce[0]=254&value[0]=0&receiver[0]=erd1wh9c0sjr2xn8hzf02lwwcr4jk2s84tat9ud2kaq6zr7xzpvl9l5q8awmex&sender[0]=erd1wh9c0sjr2xn8hzf02lwwcr4jk2s84tat9ud2kaq6zr7xzpvl9l5q8awmex&gasPrice[0]=1000000000&gasLimit[0]=50000&chainID[0]=D&version[0]=1&signature[0]=e1c35288992ad30b998ecfd82d8beeaf91c598fe42896f8d3aa4aa31cad3f3ee1c9cc1533ba60c88a0a2c132cb04da02dd50f6b246e471f3bd25271cab9c6d05&walletProviderStatus=transactionsSigned

but has no data field in it

The current implementation data: urlParams["data"][i] ?? "", does throws an error because it cannot read from index i.

Proposed solution makes data field presence optional