From 359bc6be9702e04300f1c479908a63dee5430332 Mon Sep 17 00:00:00 2001 From: Kami Date: Sun, 25 Feb 2024 13:56:21 +0330 Subject: [PATCH] address issue SAY-01 add warning message closes #15 --- packages/snap/snap.manifest.json | 2 +- packages/snap/src/index.test.ts | 7 ++++++- packages/snap/src/rpc/signRaw.ts | 2 +- packages/snap/src/ui/showConfirmTx.ts | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index f6de90f..a75e05c 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -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", diff --git a/packages/snap/src/index.test.ts b/packages/snap/src/index.test.ts index 0fab235..f56bcf9 100644 --- a/packages/snap/src/index.test.ts +++ b/packages/snap/src/index.test.ts @@ -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, ), ]) @@ -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, ) ]) diff --git a/packages/snap/src/rpc/signRaw.ts b/packages/snap/src/rpc/signRaw.ts index 48f3a40..21ed33f 100644 --- a/packages/snap/src/rpc/signRaw.ts +++ b/packages/snap/src/rpc/signRaw.ts @@ -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, ), ]); diff --git a/packages/snap/src/ui/showConfirmTx.ts b/packages/snap/src/ui/showConfirmTx.ts index 4f696c6..941b6ea 100644 --- a/packages/snap/src/ui/showConfirmTx.ts +++ b/packages/snap/src/ui/showConfirmTx.ts @@ -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([