Skip to content

Commit

Permalink
CU-864dz6z38 - Wc: When not sending a signature scope the wallet shou…
Browse files Browse the repository at this point in the history
…ld use the default (CalledByEntry, not None. None would be if the developer explicitly says None)
  • Loading branch information
LAPTOP-HBL4M4SL\rauld committed Feb 15, 2023
1 parent d917a05 commit 582bb01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/components/ConnectDapp/ApproveTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ const ApproveTransaction = ({
])}
>
<label>signature scope</label>
{!!request.params.request.params.signers.length && (
{request.params.request.params.signers.length ? (
<div>
{
WITNESS_SCOPE[
Expand All @@ -427,6 +427,8 @@ const ApproveTransaction = ({
String(request.params.request.params.signers[0]?.scopes)
] === 'Global' && <WarningIcon />}
</div>
) : (
<div>{WITNESS_SCOPE['1']}</div>
)}
</div>
)}
Expand Down
4 changes: 3 additions & 1 deletion app/context/WalletConnect/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ class N3Helper {
account: account.scriptHash,
})

signer.scopes = signerEntry && signerEntry.scopes
signer.scopes = signerEntry
? signerEntry.scopes
: tx.WitnessScope.CalledByEntry
if (signerEntry && signerEntry.allowedContracts) {
signer.allowedContracts = signerEntry.allowedContracts.map(ac =>
Neon.u.HexString.fromHex(ac),
Expand Down

0 comments on commit 582bb01

Please sign in to comment.