Skip to content

Commit

Permalink
Update example shasums and fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Jun 25, 2024
1 parent d9fa3c7 commit d9791cd
Show file tree
Hide file tree
Showing 32 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "4IXZUpu5c/MQeclr0n7JR4UDXWR42gkKrevGsvH9+eI=",
"shasum": "Byi/H/bnSfp0008lNa64vVd+I4hr7vGYOd1vvUKLy6Q=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "HOLzSNFIbp+7zhtyJRojECs7uNT8ad2zQ8Fjk0JS9dc=",
"shasum": "IuLBF2oXCCPr7bQAqeCKJQDCwOcTLB/nr7e/iEhc3hI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "10sH0m4LqwDDR472rAvfrGiuleCVONMER/pS+NVk6eg=",
"shasum": "1CgqB5tunBxWJY6dH0qLSaEMMRLPpNBdeKkO8X29WTk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "1Z5aFbtr+Tqbf/9iAqRZqZ1/Qitxy0e0h+pQ1mOjaKk=",
"shasum": "hu/qhfjItbhezCm5BR+nYroS4Lx+opOF+PmbkQDtg3s=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "RNZG5+v6mQweE57kkgDcDHy3SfSFsq1ODgumQMkfIMs=",
"shasum": "YmWlCYW7uYcqvxZIQzwK7HabstOIg5PPk2RTjNd88rg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/cronjobs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "ENavvrIscXQ2skjbLULpEcVmTwjnsjWgVDOp7gs2MXU=",
"shasum": "B6KU5qy57go5eh+sg/+UJu23e/502uqWeCjf9+OlWoY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "XTGTWf5poFWBETIqKLqxA6yN47da5DQg1fqgN2h8n8w=",
"shasum": "d3TVMjQlnsUuYQr3BtThgXQR5CihNeCe+7G1essP2fA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "poHVOW+bDoeA7XIQqQ1MZGIFK5xjjWCbsEgIg0Zgpak=",
"shasum": "LKMEeQpJpAUeP75gLC43hhaIGVGWKYCCFmyXX8Hmf00=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethers-js/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "lurLMQk7LKfjkvgqgCAvl/b/5oLOCDtJx5nJpMldzfY=",
"shasum": "d8l6QI4cpDfx5fhiy57eNpJBL4U8svkK0iso2oFaies=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/file-upload/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Av1jQi1hcpXvS90ZpDzuFyNekPlwoSVpd6zbAxIg5ho=",
"shasum": "ekluBdnUKZrz3xi6GQAvS9SCfH9jYrKp4zJZA9aAHfI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-entropy/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "4BStZsUJuwKAgopzgkVvU585/yGpEddLb8vtQlV9XVU=",
"shasum": "xrqii3cxZwPapXwKq7xwcAvveMUXO9bNybKNK9oWj+U=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "HLht/+mQ+h4Q3eEcnBrFUBA9Wk63vtjpLMS3ACuMZMc=",
"shasum": "upJ0IbdI6q5ODyeL7ve/h0kIHn/8XHOtcvSi2xzNxy4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/home-page/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "J+XH9YD9TSuDrNEDpZK7gvWP9zf7kJJ/7bEDaMpGqOw=",
"shasum": "Np7+IF40A0R7vwTu+FbuzL7nqKb31agGEvgCXt4mo0w=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/images/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "34KJa3ZMESRr9fjhCftKVURfiSowtiJjAJjA01BuG00=",
"shasum": "1ziBVGFhkeqbyPseiQz+rdURK+UNSNRFSTp3SUv8cQw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "PMOAVhfZeFCMUT05FLcD7sGUQvMZDbnfdWvz5a8Q6Oc=",
"shasum": "CLvEhXDHMGpDmuJxnbJ32dh8UsVJ/EYEi0ZK/EOQfuE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "MeX7rYGFk6C8oZiVjtY3wZ43TLOtZKJ2IjNMvG09IOY=",
"shasum": "bpvJpMeuVuNXrFAjc9vBaFXOlPrnZiLddPYbLPu+yQw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Bt6A4C4KdCqkmviIIpD/pdvOufkctqGhiNChuTNftgM=",
"shasum": "5l/V+pM0BrArHNUSlbcz9XBGAoy31K8RsQKN+Y89IX8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/json-rpc/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Nv/n0UAK3Q5H6cVhBYOWf2Hi1gwQrEXpESWnhSNOZwE=",
"shasum": "qpDrVhSorpwBWW78CBLaXWQkDUJ5qggIBKWPysSnQ8I=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/jsx/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "2kOR9YAry+wbXnrGcnWhu/CsP+S4ntQQhnsz54B6t+A=",
"shasum": "DBvbdjJr7Y5LXEW7d9PSwdisDZJf1GDtRekE0JvuTZs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "1x4zcOz0pjhkKrRzWq30mlWq1fNdlDi+uqhZTIdrLnI=",
"shasum": "JJ6AxQWduCack7Su3gOopQwZjf+wMLTqGq4VBXhWESE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/localization/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "QyjKprdu/mZjM87yb6/d6pB6jfxCU5ovJjsVaFhqk84=",
"shasum": "pfqmekThXhPNEeoHbcySEP7ClJBCcjUq7MfFaw7hFRQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/manage-state/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "bElhYcFIER1q1AKciAB45RSmAn2GrMBjNl16id/HL+g=",
"shasum": "Pvu0YyKaIw19lC22uB0EWpLRdAYhWlrfvyylvspU3E8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "8MCxWFBZfATXhTBWlScFSA71hmSZUorb3+LQ18GBT8g=",
"shasum": "o6WhGECOw9xpyX55/busOBMeUcK81WAs85aqxYnLCi4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "0IT/z87bMaubGohB/Ipe6D5UAmRM21OebhpHreyPVXQ=",
"shasum": "NoYQKRM/N11naPhb8nzwByO1e4mYzP6A8sM4WHMaZJI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "ZSgxU8S6Em+cE3UAMwYKLQKiq508IRgpt4lr5Ang6nE=",
"shasum": "OfJ9ohG7cHQcCR/ZGsrJO/59gBMgxrjicgLd4HLvlBA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "AdeKx9N7wBhGhH8xRkViuCeQUaY/04/zKpc9ljts8mE=",
"shasum": "NIk0pXv5i65fIGOGcT3Ui+cbockTCtcknOBD98YGcYk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Krh91KAe9csUahWlmgeNPsYtPDq3Cwnow8lDEjQbn1g=",
"shasum": "Ee0iPFfTAzHSm9f4weR9ABIi3UEZM9ZTgonQXiPq2Zw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/wasm/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "jDnLbh7punh//wtoINzEq3r4/WUalg2DEhqXqfe54Yk=",
"shasum": "Af49yqnRMvMRWxw9JWWCA/Hu8mt/BZK46vTtfGCbR7c=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "rXZAW6cx/+abgP56Pb9H9nyVcVD6r31c44xdIZTbPYM=",
"shasum": "4KNo22mjqK9EadA9gIr6o8mPiX/G0an0Burquhoycns=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
8 changes: 6 additions & 2 deletions packages/snaps-jest/src/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import type {
ComponentOrElement,
Component,
} from '@metamask/snaps-sdk';
import type { JSXElement, SnapNode } from '@metamask/snaps-sdk/jsx';
import type {
GenericSnapElement,
JSXElement,
SnapNode,
} from '@metamask/snaps-sdk/jsx';
import { isJSXElementUnsafe } from '@metamask/snaps-sdk/jsx';
import { getJsxElementFromComponent } from '@metamask/snaps-utils';
import type { Json } from '@metamask/utils';
Expand Down Expand Up @@ -234,7 +238,7 @@ export function serialiseJsx(node: SnapNode, indentation = 0): string {
return '';
}

const { type, props } = node;
const { type, props } = node as GenericSnapElement;
const trailingNewline = indentation > 0 ? '\n' : '';

if (hasProperty(props, 'children')) {
Expand Down
3 changes: 1 addition & 2 deletions packages/snaps-sdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"jsx.d.ts",
"jsx-runtime.d.ts",
"jsx-dev-runtime.d.ts"
],
"exclude": ["./dist"]
]
}
4 changes: 2 additions & 2 deletions packages/snaps-utils/src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
ItalicChildren,
JSXElement,
LinkElement,
MaybeArray,
Nestable,
RowChildren,
StandardFormattingElement,
TextChildren,
Expand Down Expand Up @@ -433,7 +433,7 @@ export function getTotalTextLength(component: Component): number {
export function hasChildren<Element extends JSXElement>(
element: Element,
): element is Element & {
props: { children: MaybeArray<JSXElement | string> };
props: { children: Nestable<JSXElement | string> };
} {
return hasProperty(element.props, 'children');
}
Expand Down

0 comments on commit d9791cd

Please sign in to comment.