Skip to content

Commit f8de130

Browse files
fix: update warning icon color to error red for malicious addresses (#287)
- Updated @metamask/snaps-sdk from 10.2.0 to 11.0.0 - Changed icon color from 'primary' to 'error' in AddressField and TextField components - This fixes the warning icons for potentially malicious websites/addresses to display in error red instead of blue Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jeffsmale90 <jeffsmale90@users.noreply.github.com>
1 parent 6f93f6e commit f8de130

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

packages/gator-permissions-snap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@metamask/abi-utils": "3.0.0",
5151
"@metamask/delegation-core": "0.3.0",
5252
"@metamask/profile-sync-controller": "21.0.0",
53-
"@metamask/snaps-sdk": "10.2.0",
53+
"@metamask/snaps-sdk": "11.0.0",
5454
"@metamask/utils": "11.4.2",
5555
"zod": "3.25.76"
5656
},

packages/gator-permissions-snap/src/ui/components/AddressField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const AddressField = ({
5252
{addressContent}
5353
</Box>
5454
<Box direction="horizontal" alignment="end">
55-
<Icon name="danger" size="md" color="primary" />
55+
<Icon name="danger" size="md" color="error" />
5656
<Text alignment="end" color="error">
5757
{warningLabel}
5858
</Text>

packages/gator-permissions-snap/src/ui/components/TextField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const TextField = ({
4141
<Box direction="vertical">
4242
<Text alignment="end">{value}</Text>
4343
<Box direction="horizontal" alignment="end">
44-
<Icon name="danger" size="md" color="primary" />
44+
<Icon name="danger" size="md" color="error" />
4545
<Text color="error">{warningLabel}</Text>
4646
</Box>
4747
</Box>

yarn.lock

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,7 @@ __metadata:
30863086
"@metamask/profile-sync-controller": "npm:21.0.0"
30873087
"@metamask/snaps-cli": "npm:8.3.0"
30883088
"@metamask/snaps-jest": "npm:9.8.0"
3089-
"@metamask/snaps-sdk": "npm:10.2.0"
3089+
"@metamask/snaps-sdk": "npm:11.0.0"
30903090
"@metamask/utils": "npm:11.4.2"
30913091
"@types/react": "npm:18.2.4"
30923092
"@types/react-dom": "npm:18.2.4"
@@ -3693,6 +3693,20 @@ __metadata:
36933693
languageName: node
36943694
linkType: hard
36953695

3696+
"@metamask/snaps-sdk@npm:11.0.0":
3697+
version: 11.0.0
3698+
resolution: "@metamask/snaps-sdk@npm:11.0.0"
3699+
dependencies:
3700+
"@metamask/key-tree": "npm:^10.1.1"
3701+
"@metamask/providers": "npm:^22.1.1"
3702+
"@metamask/rpc-errors": "npm:^7.0.3"
3703+
"@metamask/superstruct": "npm:^3.2.1"
3704+
"@metamask/utils": "npm:^11.10.0"
3705+
luxon: "npm:^3.5.0"
3706+
checksum: 10/83dc24c9c583ca257874498ed2b124160c559afd56f043a6e0f617fc3edc4fcbd4b1ef15efb4a197a71a8a6dd2ab20b6da87463b4261928311d39eb29f64668a
3707+
languageName: node
3708+
linkType: hard
3709+
36963710
"@metamask/snaps-sdk@npm:^10.0.0, @metamask/snaps-sdk@npm:^10.1.0, @metamask/snaps-sdk@npm:^10.2.0, @metamask/snaps-sdk@npm:^10.3.0":
36973711
version: 10.3.0
36983712
resolution: "@metamask/snaps-sdk@npm:10.3.0"
@@ -3858,6 +3872,25 @@ __metadata:
38583872
languageName: node
38593873
linkType: hard
38603874

3875+
"@metamask/utils@npm:^11.10.0":
3876+
version: 11.10.0
3877+
resolution: "@metamask/utils@npm:11.10.0"
3878+
dependencies:
3879+
"@ethereumjs/tx": "npm:^4.2.0"
3880+
"@metamask/superstruct": "npm:^3.1.0"
3881+
"@noble/hashes": "npm:^1.3.1"
3882+
"@scure/base": "npm:^1.1.3"
3883+
"@types/debug": "npm:^4.1.7"
3884+
"@types/lodash": "npm:^4.17.20"
3885+
debug: "npm:^4.3.4"
3886+
lodash: "npm:^4.17.21"
3887+
pony-cause: "npm:^2.1.10"
3888+
semver: "npm:^7.5.4"
3889+
uuid: "npm:^9.0.1"
3890+
checksum: 10/691a268af66593b60e9807a069127993cea3cdc941f99d5d7ca4664868754f08945821f1787b2f3e99e4497df63ceb0af37a2419ad494da29a1fddffe94f5797
3891+
languageName: node
3892+
linkType: hard
3893+
38613894
"@metamask/utils@npm:^9.0.0":
38623895
version: 9.3.0
38633896
resolution: "@metamask/utils@npm:9.3.0"

0 commit comments

Comments
 (0)