Skip to content

Commit

Permalink
fix: upgrade to pineapple@1 (#4216)
Browse files Browse the repository at this point in the history
* fix: upgrade to pineapple@1

* chore: update pineapple to 1.1.0
  • Loading branch information
wa0x6e authored Sep 26, 2023
1 parent b0f8634 commit 7978999
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@sentry/vue": "^7.55.2",
"@shutter-network/shutter-crypto": "0.1.0-beta.3",
"@snapshot-labs/lock": "^0.2.0",
"@snapshot-labs/pineapple": "^0.2.0",
"@snapshot-labs/pineapple": "^1.1.0",
"@snapshot-labs/snapshot.js": "^0.6.2",
"@snapshot-labs/tune": "^0.1.33",
"@vue/apollo-composable": "4.0.0-beta.4",
Expand Down
10 changes: 2 additions & 8 deletions src/composables/useImageUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ export function useImageUpload() {
try {
const receipt = await pin(formData, import.meta.env.VITE_PINEAPPLE_URL);

if (receipt.error) {
imageUploadError.value = receipt.error.message;
isUploadingImage.value = false;
return;
}

imageUrl.value = `ipfs://${receipt.cid}`;
imageName.value = file.name;
onSuccess({ name: file.name, url: imageUrl.value });
} catch (err) {
} catch (err: any) {
notify(['red', t('notify.somethingWentWrong')]);
imageUploadError.value = (err as Error).message;
imageUploadError.value = err.error?.message || err;
} finally {
isUploadingImage.value = false;
}
Expand Down
34 changes: 29 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1846,12 +1846,12 @@
"@walletconnect/modal" "^2.5.4"
fortmatic "^2.2.1"

"@snapshot-labs/pineapple@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@snapshot-labs/pineapple/-/pineapple-0.2.0.tgz#b7005baa1ee6b56d446668972fe52b420fa12357"
integrity sha512-qphtrQQVYyDVbviak2Zluuh73SWaQFnG9+K/oLsSKSLg0TQmrY8aYxxjDipOTtX0Oyz7+OWYaADZ37gVyp/JxA==
"@snapshot-labs/pineapple@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@snapshot-labs/pineapple/-/pineapple-1.1.0.tgz#cccd1b8c81889b2109a46fddc362908493a8c07c"
integrity sha512-LIWmpdO3UF8WhKSlMkGsnCk2eY8KktVUS+qhMWIpXI+ffv0KTSBEnUj7J0v8baoOgSfv1u9HIgG+V2zJFrdk1w==
dependencies:
cross-fetch "^3.1.5"
ofetch "^1.3.3"

"@snapshot-labs/snapshot.js@^0.6.2":
version "0.6.2"
Expand Down Expand Up @@ -6345,6 +6345,11 @@ depd@~1.1.2:
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==

destr@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.1.tgz#2fc7bddc256fed1183e03f8d148391dde4023cb2"
integrity sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==

[email protected]:
version "1.2.0"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
Expand Down Expand Up @@ -11369,6 +11374,11 @@ node-addon-api@^2.0.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32"
integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==

node-fetch-native@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.4.0.tgz#fbe8ac033cb6aa44bd106b5e4fd2b6277ba70fa1"
integrity sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==

node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
Expand Down Expand Up @@ -11615,6 +11625,15 @@ obuf@^1.0.0, obuf@^1.1.2:
resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==

ofetch@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.3.tgz#588cb806a28e5c66c2c47dd8994f9059a036d8c0"
integrity sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==
dependencies:
destr "^2.0.1"
node-fetch-native "^1.4.0"
ufo "^1.3.0"

on-exit-leak-free@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209"
Expand Down Expand Up @@ -14720,6 +14739,11 @@ ufo@^1.1.2:
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.1.2.tgz#d0d9e0fa09dece0c31ffd57bd363f030a35cfe76"
integrity sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==

ufo@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.0.tgz#c92f8ac209daff607c57bbd75029e190930a0019"
integrity sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==

uint8arrays@^3.0.0, uint8arrays@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0"
Expand Down

0 comments on commit 7978999

Please sign in to comment.