Skip to content

Commit

Permalink
Merge pull request #16 from PolkaGate/addWarning
Browse files Browse the repository at this point in the history
address issue SAY-01: add warning message
  • Loading branch information
Nick-1979 authored Feb 25, 2024
2 parents de298f6 + 359bc6b commit d3cf6fd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/polkagate/snap.git"
},
"source": {
"shasum": "4TiWO4/4fSB79wj6W5U/PywuXKP0MXc7NESoKpqF+J4=",
"shasum": "jsKoryHeDM8cTaZAJ+CrTx0pSRK5yQH+RJJl1MqUkic=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
7 changes: 6 additions & 1 deletion packages/snap/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ describe('onRpcRequest', () => {
panel([copyable(signRawParams.raw.data), divider()]),
row(
'Warning:',
text(`**${'proceed only if you understand the message above!'}**`),
text(`${'proceed only if you understand the message above!'}`),
RowVariant.Warning,
),
])
Expand Down Expand Up @@ -260,6 +260,11 @@ describe('onRpcRequest', () => {
row(
'More info:',
text('**See [Pallet::transfer_keep_alive].**'),
RowVariant.Default,
),
row(
'Warning:',
text(`${'proceed only if you understand the details above!'}`),
RowVariant.Warning,
)
])
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/src/rpc/signRaw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const contentSignRaw = (origin: string, hexString: string) => {
panel([copyable(data), divider()]),
row(
'Warning:',
text(`**${'proceed only if you understand the message above!'}**`),
text(`${'proceed only if you understand the message above!'}`),
RowVariant.Warning,
),
]);
Expand Down
5 changes: 5 additions & 0 deletions packages/snap/src/ui/showConfirmTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ const transactionContent = (
text(`**${decoded.docs || 'Update metadata to view this!'}**`),
RowVariant.Default,
),
row(
'Warning:',
text(`${'proceed only if you understand the details above!'}`),
RowVariant.Warning,
),
];

return panel([
Expand Down

0 comments on commit d3cf6fd

Please sign in to comment.