From 3c40435205760db47342a2f8be551487529c40bc Mon Sep 17 00:00:00 2001 From: Abbes Benayache Date: Mon, 10 Feb 2025 16:03:16 +0100 Subject: [PATCH 1/2] web3telegram : add dapp ens name & whitelist address --- src/config/config.ts | 7 +++---- .../myProtectedData/oneProtectedData/GrantAccessModal.tsx | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/config.ts b/src/config/config.ts index c4a3453..b7bec74 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -10,11 +10,10 @@ export const ITEMS_PER_PAGE = 6; export const WEB3MAIL_IAPPS_WHITELIST_SC = '0x781482c39cce25546583eac4957fb7bf04c277d2'; -export const WEB3TELEGRAM_IAPP_ADDRESS = - '0x90CE3811b8BE4E09A1e9DfdCC83DEc819D5c4F5a'; +export const WEB3TELEGRAM_IAPP_ADDRESS = 'web3telegram.apps.iexec.eth'; -// TODO Later we'll have a whitelist for all web3telegram iApps -// export const WEB3TELEGRAM_IAPPS_WHITELIST_SC = '0x...'; +export const WEB3TELEGRAM_IAPP_WHITELIST_SC = + '0x0745eDe758C25365392DFD94890972f419876f1A'; export const PROD_WORKERPOOL_ADDRESS = 'prod-v8-learn.main.pools.iexec.eth'; diff --git a/src/features/myProtectedData/oneProtectedData/GrantAccessModal.tsx b/src/features/myProtectedData/oneProtectedData/GrantAccessModal.tsx index 72351f4..5ef6545 100644 --- a/src/features/myProtectedData/oneProtectedData/GrantAccessModal.tsx +++ b/src/features/myProtectedData/oneProtectedData/GrantAccessModal.tsx @@ -59,6 +59,7 @@ export default function GrantAccessModal(props: GrantAccessModalParams) { if (isKeyInDataSchema(props.protectedData.schema, 'email')) { appOrWhitelistAddress = WEB3MAIL_IAPPS_WHITELIST_SC; } else if (isKeyInDataSchema(props.protectedData.schema, 'chatId')) { + // TODO Replace with WEB3TELEGRAM_IAPP_WHITELIST_SC when iapp is deployed on prod and added to it (promote add-resource-to-whitelist-prod with params params: CONTRACT_ADDRESS & ADDRESS_TO_ADD on https://drone-product.iex.ec/iExecBlockchainComputing/whitelist-smart-contract/169) appOrWhitelistAddress = WEB3TELEGRAM_IAPP_ADDRESS; } else { // appOrWhitelistAddress = ''; // TODO Put delivery iApp here? From ca67a2e9b130618b4a70323c2309088abd8f9c8a Mon Sep 17 00:00:00 2001 From: Abbes Benayache Date: Mon, 10 Feb 2025 16:16:32 +0100 Subject: [PATCH 2/2] fiw createArrayBufferFromFile return type --- src/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index c4060de..432bd43 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -46,7 +46,7 @@ export const createArrayBufferFromFile = async ( reject(new DOMException('Error parsing input file.')); }; fileReader.onload = () => { - resolve(fileReader.result as Uint8Array); + resolve(new Uint8Array(fileReader.result as ArrayBuffer)); }; fileReader.readAsArrayBuffer(file); });