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

web3telegram : add dapp ens name & whitelist address #83

Open
wants to merge 2 commits into
base: feature/add-telegram
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down