Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wallet to v0.2.5 #42

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
"description": "Massa blockchain official wallet",
"assets": {
"windows": {
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_windows-amd64.zip",
"checksum": "30b83890b32afa801fa6f0bda678dedd"
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_windows-amd64.zip",
"checksum": "85f199123dd0e72e14ac0e3bbec2edff"
},
"linux": {
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_linux-amd64.zip",
"checksum": "b1fe39ad7c0bd164cb08a9ab929377bc"
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_linux-amd64.zip",
"checksum": "fead5743653d420483e11f42281fd95d"
},
"macos-arm64": {
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_darwin-arm64.zip",
"checksum": "b3d2888298eb2b31dd4722a8830ae5f1"
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_darwin-arm64.zip",
"checksum": "ab40a5cc281ca912d6284e493558be90"
},
"macos-amd64": {
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_darwin-amd64.zip",
"checksum": "b0ec455b334dc3f167256b3b89574e84"
"url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_darwin-amd64.zip",
"checksum": "0eced777b9a80c60a4f65fd79c0fefde"
}
},
"version": "0.2.4",
"version": "0.2.5",
"url": "https://github.com/massalabs/station-massa-plugin-wallet"
}
]
17 changes: 10 additions & 7 deletions src/validate-store-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ const patterns = {
"macos-amd64": /^[^.]+$/,
"macos-arm64": /^[^.]+$/
};

function areAllFilesInZipValid(files: Array<string>, pattern: RegExp) {
return files.every(
// all files must be either a binary either a manifest either an image
(file) =>
(!!file.match(pattern) !== // file is a binary
IMAGE_FORMATS.some((format) => file.endsWith(`.${format}`))) !== // file is an image
(file === "manifest.json") // file is a manifest
);
return files.every((file) => {
const isBinary = !!file.match(pattern);
const isImage = IMAGE_FORMATS.some((format) => file.endsWith(`.${format}`));
const isManifest = file === "manifest.json";
const isZip = file.endsWith(".zip")

return (isBinary || isImage || isManifest || isZip);
});
}

async function checkPluginZips(plugin: StorePlugin) {
for (let assetName in plugin.assets) {
const asset = plugin.assets[assetName];
Expand Down