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? 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); });