diff --git a/packages/examples/packages/bip32/snap.manifest.json b/packages/examples/packages/bip32/snap.manifest.json index 43b8514e21..4456a97932 100644 --- a/packages/examples/packages/bip32/snap.manifest.json +++ b/packages/examples/packages/bip32/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "hRuh420QB8uksiS3rFwrvqNoQD5XTH/QyWkhFkmNBD8=", + "shasum": "wvItJBAL+To/LRiET0hoeTHchcoc/67OZf3d3fZRSx0=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/bip44/snap.manifest.json b/packages/examples/packages/bip44/snap.manifest.json index f2130d0f11..63b51785d0 100644 --- a/packages/examples/packages/bip44/snap.manifest.json +++ b/packages/examples/packages/bip44/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "kztNgPuBct9iJIGhWZs2i/yluGPJSQi0xl5+00opVGs=", + "shasum": "lNTBthbBZXfpL7IKOchQcu7o3w79o0leXZnrJsTmNqQ=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/browserify-plugin/snap.manifest.json b/packages/examples/packages/browserify-plugin/snap.manifest.json index 376571c97a..74fa283d77 100644 --- a/packages/examples/packages/browserify-plugin/snap.manifest.json +++ b/packages/examples/packages/browserify-plugin/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "Ezgekk8R9FYAZJM3/BMlFrV5f03DueKtm+uWQI/ekgQ=", + "shasum": "w8ZPchwG+LqlFzbmkqVQ5nDqt5GDFkZsU8dUm1b5NXo=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/browserify/snap.manifest.json b/packages/examples/packages/browserify/snap.manifest.json index ab2a42fca7..c13937ecd6 100644 --- a/packages/examples/packages/browserify/snap.manifest.json +++ b/packages/examples/packages/browserify/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "gmim/O6MOkQRLCtPc4mJh0PtSUi+CICb+4+cp6gTX5Y=", + "shasum": "cekcKLYno5G+cLUUsfxXHpvz+B8x/woWZ8PgDsK5VkM=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/cronjobs/snap.manifest.json b/packages/examples/packages/cronjobs/snap.manifest.json index 9f65cb0d1f..42f2ebbcf4 100644 --- a/packages/examples/packages/cronjobs/snap.manifest.json +++ b/packages/examples/packages/cronjobs/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "ZjF3VIQyyZMjs7bCHZHcBqkkM4mxQjAHhxURv3bNdIg=", + "shasum": "lBiyF1iYoelw+RiOjct3Bg+JglJWZHxwbAvibK43Zv4=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/dialogs/snap.manifest.json b/packages/examples/packages/dialogs/snap.manifest.json index c3eee95800..247322c43a 100644 --- a/packages/examples/packages/dialogs/snap.manifest.json +++ b/packages/examples/packages/dialogs/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "Mo4tLj3FLGjTrODhiznPVbTmqLdghRqKWaAEhPUmBmg=", + "shasum": "c7cbaBY5NK97dUF5sBtdPpggopBGodqHXZf6I2zcwas=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/ethers-js/snap.manifest.json b/packages/examples/packages/ethers-js/snap.manifest.json index 23600ab4d0..4707a4796e 100644 --- a/packages/examples/packages/ethers-js/snap.manifest.json +++ b/packages/examples/packages/ethers-js/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "kgnGTfsOQs26Kb8oopMnEvXPmbOeDqy0BllLa9z5GCM=", + "shasum": "SFJepq0B6/idN8MNTB7ynSvYEWAwXZNg4ADVbp7X6mk=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/get-entropy/snap.manifest.json b/packages/examples/packages/get-entropy/snap.manifest.json index dad8d9c063..d36f29e07e 100644 --- a/packages/examples/packages/get-entropy/snap.manifest.json +++ b/packages/examples/packages/get-entropy/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "i70snr3mPw7knx20YaN64bYsJjEgaqNNDl01oFi4Bo4=", + "shasum": "5j9zhSuGBqFioXLJffAkm1bSPmGM/8MZPiXfsQXoJ88=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/images/snap.manifest.json b/packages/examples/packages/images/snap.manifest.json index 061436bd4d..34659c1247 100644 --- a/packages/examples/packages/images/snap.manifest.json +++ b/packages/examples/packages/images/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "KJTZWGggYaU8C3LnOd9CodSJoIMtvzkNKC5bzfMPg4M=", + "shasum": "9KrhQU4Gjrw3B0lFVXx1nITRJIyXzDkOMQMKU9YAfWc=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json b/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json index 183c065105..5b04ccd81a 100644 --- a/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json +++ b/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "g0lygIry0x1ULrACMgFTncUXfstO2l+7iM7/D65BXqY=", + "shasum": "tU0G6gMy1ps7Bto1LuRGCA7pzf2fb38beJypAiht/FY=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/signature-insights/snap.manifest.json b/packages/examples/packages/signature-insights/snap.manifest.json index 6b0b7cd139..f346c31a05 100644 --- a/packages/examples/packages/signature-insights/snap.manifest.json +++ b/packages/examples/packages/signature-insights/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "hlMIB9kls/72D0A77vdvIkZEbJNUDj3Py9PIxm7aWOM=", + "shasum": "triP7af/N+IxfSBDbQ8K/TDD5wePm2Nx+ywOGljlToo=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/transaction-insights/snap.manifest.json b/packages/examples/packages/transaction-insights/snap.manifest.json index d75cd30980..be96acb61b 100644 --- a/packages/examples/packages/transaction-insights/snap.manifest.json +++ b/packages/examples/packages/transaction-insights/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "oKKYF+AERJAyRBABHRf4nsfQ6IrhKele+Fei+JXxGzA=", + "shasum": "tp4cz9UpX+/BJda+tQM0Go4V2iq4529PoEm9dguiA9o=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/snaps-sdk/src/ui/components/button.ts b/packages/snaps-sdk/src/ui/components/button.ts index 6103999e19..285968bce6 100644 --- a/packages/snaps-sdk/src/ui/components/button.ts +++ b/packages/snaps-sdk/src/ui/components/button.ts @@ -15,6 +15,7 @@ import { LiteralStruct, NodeType } from '../nodes'; export enum ButtonVariant { Primary = 'primary', Secondary = 'secondary', + Loading = 'loading', } export enum ButtonType { @@ -31,6 +32,7 @@ export const ButtonStruct = assign( union([ enumValue(ButtonVariant.Primary), enumValue(ButtonVariant.Secondary), + enumValue(ButtonVariant.Loading), ]), ), buttonType: optional( diff --git a/packages/snaps-utils/src/ui.tsx b/packages/snaps-utils/src/ui.tsx index 10aaff7b2c..9b530c1aca 100644 --- a/packages/snaps-utils/src/ui.tsx +++ b/packages/snaps-utils/src/ui.tsx @@ -51,12 +51,16 @@ const ALLOWED_PROTOCOLS = ['https:', 'mailto:', 'metamask:']; * @param variant - The legacy button component variant. * @returns The button variant. */ -function getButtonVariant(variant?: 'primary' | 'secondary' | undefined) { +function getButtonVariant( + variant?: 'primary' | 'secondary' | 'loading' | undefined, +) { switch (variant) { case 'primary': return 'primary'; case 'secondary': return 'destructive'; + case 'loading': + return 'loading'; default: return undefined; }