From cfe9c8f7f96ce904f8fbe790cf0617d5ee657554 Mon Sep 17 00:00:00 2001 From: Boldizsar Mezei Date: Wed, 8 Nov 2023 00:57:49 +0100 Subject: [PATCH] Set projectapikey with file upload Fixes --- src/app/@api/file.api.ts | 1 + .../wallet-deeplink.component.html | 16 ++----------- .../wallet-deeplink.component.ts | 23 ++++++++++++------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/app/@api/file.api.ts b/src/app/@api/file.api.ts index 918e2b9..cbfeeac 100644 --- a/src/app/@api/file.api.ts +++ b/src/app/@api/file.api.ts @@ -47,6 +47,7 @@ export class FileApi { formData.append('file', item.postFile); formData.append('member', memberId); formData.append('uid', item.file.uid); + formData.append('projectApiKey', environment.build5Token); const origin = environment.production ? BUILD5_PROD_ADDRESS_API : BUILD5_TEST_ADDRESS_API; return this.httpClient .post(origin + WEN_FUNC.uploadFile, formData) diff --git a/src/app/components/wallet-deeplink/wallet-deeplink.component.html b/src/app/components/wallet-deeplink/wallet-deeplink.component.html index 2220aa6..f4d05a4 100644 --- a/src/app/components/wallet-deeplink/wallet-deeplink.component.html +++ b/src/app/components/wallet-deeplink/wallet-deeplink.component.html @@ -1,22 +1,10 @@
- +
Bloom logo
- +
Firefly logo
Firefly
diff --git a/src/app/components/wallet-deeplink/wallet-deeplink.component.ts b/src/app/components/wallet-deeplink/wallet-deeplink.component.ts index 52c3675..402b506 100644 --- a/src/app/components/wallet-deeplink/wallet-deeplink.component.ts +++ b/src/app/components/wallet-deeplink/wallet-deeplink.component.ts @@ -70,7 +70,7 @@ export class WalletDeeplinkComponent { } @Input() public showTanglePay = true; - + public bloomDeepLink?: SafeUrl; public fireflyDeepLink?: SafeUrl; public tanglePayDeepLink?: SafeUrl; @@ -97,22 +97,29 @@ export class WalletDeeplinkComponent { // Shimmer Network const parameters = { address: this.targetAddress, - baseCoinAmount: this.tokenId && this.surplus ? Number(this.targetAmount).toFixed(0): undefined, + baseCoinAmount: + this.tokenId && this.surplus ? Number(this.targetAmount).toFixed(0) : undefined, tokenId: this.tokenId, tokenAmount: this.tokenId ? this.tokenAmount : undefined, tag: WEN_NAME.toLowerCase(), giftStorageDeposit: true, disableToggleGift: true, disableChangeExpiration: true, - disableChangeTimelock: true + disableChangeTimelock: true, }; - const searchParametersArray: (string | undefined)[] = Object.entries(parameters).map(([key, value]) => { return value ? `${key}=${value}` : undefined}); - const searchParametersString = searchParametersArray.filter(x => x !== undefined).flat().join('&'); + const searchParametersArray: (string | undefined)[] = Object.entries(parameters).map( + ([key, value]) => { + return value ? `${key}=${value}` : undefined; + }, + ); + const searchParametersString = searchParametersArray + .filter((x) => x !== undefined) + .flat() + .join('&'); return this.sanitizer.bypassSecurityTrustUrl( - `bloom://wallet/sendTransaction?${searchParametersString}` - ) - + `bloom://wallet/sendTransaction?${searchParametersString}`, + ); } }