From 119c11ed0ad86e003cb85c590ac3c0418ded2f6e Mon Sep 17 00:00:00 2001 From: Varun Parthasarathy Date: Tue, 7 Feb 2023 10:24:58 -0800 Subject: [PATCH 1/4] update backup chunk size target from 50 to 500 --- packages/core/src/implementations/utilities/ConfigProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/implementations/utilities/ConfigProvider.ts b/packages/core/src/implementations/utilities/ConfigProvider.ts index 881bb15042..9d1cf6fbd2 100644 --- a/packages/core/src/implementations/utilities/ConfigProvider.ts +++ b/packages/core/src/implementations/utilities/ConfigProvider.ts @@ -79,7 +79,7 @@ export class ConfigProvider 5000, // polling interval balance 5000, // polling interval nfts 60000, // backup interval - 50, // backup chunk size target + 500, // backup chunk size target "ckey_ee277e2a0e9542838cf30325665", // covalent api key "aqy6wZJX3r0XxYP9b8EyInVquukaDuNL9SfVtuNxvPqJrrPon07AvWUmlgOvp5ag", // moralis api key "lusr87vNmTtHGMmktlFyi4Nt", // NftScan api key From 410b68ae9641d4b32174112dcce5b3e3e3b0393b Mon Sep 17 00:00:00 2001 From: Varun Parthasarathy Date: Tue, 7 Feb 2023 11:16:17 -0800 Subject: [PATCH 2/4] update overrides ' --- packages/browserExtension/package.json | 4 ++-- .../src/extensionCore/implementations/ExtensionCore.ts | 1 + packages/browserExtension/src/shared/objects/Config.ts | 3 ++- packages/browserExtension/src/shared/utils/ConfigProvider.ts | 4 ++++ packages/core/src/implementations/utilities/ConfigProvider.ts | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/browserExtension/package.json b/packages/browserExtension/package.json index a407274c12..eb6cdc4d69 100644 --- a/packages/browserExtension/package.json +++ b/packages/browserExtension/package.json @@ -12,8 +12,8 @@ "build-demo-03": "yarn precompile && yarn compile && __REQUEST_FOR_DATA_EVENT_FREQ__=4000 __CONTROL_CHAIN_ID__=31337 __ONBOARDING_URL__='https://datawallet.demo-03.snickerdoodle.dev/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='80001,43113,1,137,43114,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.dev/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.demo-03.snickerdoodle.dev/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __CONTROL_CHAIN_PROVIDER_URL__='https://doodlechain.demo-03.snickerdoodle.dev' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs demo03", "build-demo-04": "yarn precompile && yarn compile && __REQUEST_FOR_DATA_EVENT_FREQ__=4000 __CONTROL_CHAIN_ID__=31337 __ONBOARDING_URL__='https://datawallet.demo-04.snickerdoodle.dev/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='80001,43113,1,137,43114,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.dev/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.demo-04.snickerdoodle.dev/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __CONTROL_CHAIN_PROVIDER_URL__='https://doodlechain.demo-04.snickerdoodle.dev' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs demo04", "build-demo-05": "yarn precompile && yarn compile && __REQUEST_FOR_DATA_EVENT_FREQ__=4000 __CONTROL_CHAIN_ID__=31337 __ONBOARDING_URL__='https://datawallet.demo-05.snickerdoodle.dev/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='80001,43113,1,137,43114,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.dev/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.demo-05.snickerdoodle.dev/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __CONTROL_CHAIN_PROVIDER_URL__='https://doodlechain.demo-05.snickerdoodle.dev' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs demo05", - "build-prod": "yarn precompile && yarn compile && __REQUEST_FOR_DATA_EVENT_FREQ__=300000 __CONTROL_CHAIN_ID__=43113 __ONBOARDING_URL__='https://datawallet.snickerdoodle.com/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='1,43113,43114,137,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.com/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.snickerdoodle.com/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs prod", - "build-prod-for-qa": "yarn precompile && yarn compile && __REQUEST_FOR_DATA_EVENT_FREQ__=4000 __CONTROL_CHAIN_ID__=43113 __ONBOARDING_URL__='https://datawallet.snickerdoodle.com/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='1,43113,43114,137,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.com/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.snickerdoodle.com/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs prod", + "build-prod": "yarn precompile && yarn compile && __BACKUP_CHUNK_SIZE__=500 __REQUEST_FOR_DATA_EVENT_FREQ__=300000 __CONTROL_CHAIN_ID__=43113 __ONBOARDING_URL__='https://datawallet.snickerdoodle.com/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='1,43113,43114,137,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.com/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.snickerdoodle.com/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs prod", + "build-prod-for-qa": "yarn precompile && yarn compile && __BACKUP_CHUNK_SIZE__=500 __REQUEST_FOR_DATA_EVENT_FREQ__=4000 __CONTROL_CHAIN_ID__=43113 __ONBOARDING_URL__='https://datawallet.snickerdoodle.com/' __ACCOUNT_COOKIE_URL__='https://snickerdoodlelabs.io/' __SUPPORTED_CHAINS__='1,43113,43114,137,-1,100,56,1284' __IPFS_FETCH_BASE_URL__='https://ipfs-gateway.snickerdoodle.com/ipfs/' __DEFAULT_INSIGHT_PLATFORM_BASE_URL__='https://insight-api.snickerdoodle.com/v0/' __CERAMIC_NODE_URL__='https://ceramic.snickerdoodle.dev/' __COVALENT_API_KEY__='' __MORALIS_API_KEY__='' __NFTSCAN_API_KEY__='' __DOMAIN_FILTER__='(localhost|chrome:\/\/)' __DNS_SERVER_ADDRESS__='' node utils/build.cjs prod", "build-setup-demo-01": "git status && git checkout sandbox/DEMO-01 && git pull && yarn install; true && yarn build-demo-01 && open .", "build-setup-demo-02": "git status && git checkout sandbox/DEMO-02 && git pull && yarn install; true && yarn build-demo-02 && open .", "build-setup-demo-03": "git status && git checkout sandbox/DEMO-03 && git pull && yarn install; true && yarn build-demo-03 && open .", diff --git a/packages/browserExtension/src/extensionCore/implementations/ExtensionCore.ts b/packages/browserExtension/src/extensionCore/implementations/ExtensionCore.ts index 6c454b7e5b..316b32b401 100644 --- a/packages/browserExtension/src/extensionCore/implementations/ExtensionCore.ts +++ b/packages/browserExtension/src/extensionCore/implementations/ExtensionCore.ts @@ -73,6 +73,7 @@ export class ExtensionCore { accountIndexingPollingIntervalMS: UNREALISTIC_BUT_WORKING_POLL_INTERVAL, // SIX_HOURS_MS accountNFTPollingIntervalMS: UNREALISTIC_BUT_WORKING_POLL_INTERVAL, // SIX_HOURS_MS dataWalletBackupIntervalMS: SIX_HOURS_MS, + backupChunkSizeTarget: config.backupChunkSizeTarget, requestForDataCheckingFrequency: config.requestForDataCheckingFrequency, domainFilter: config.domainFilter, } as IConfigOverrides; diff --git a/packages/browserExtension/src/shared/objects/Config.ts b/packages/browserExtension/src/shared/objects/Config.ts index 1687d551fd..a860c543de 100644 --- a/packages/browserExtension/src/shared/objects/Config.ts +++ b/packages/browserExtension/src/shared/objects/Config.ts @@ -20,6 +20,7 @@ export class ExtensionConfig { public nftScanApiKey?: string, public dnsServerAddress?: URLString, public requestForDataCheckingFrequency?: number, - public domainFilter?: string + public domainFilter?: string, + public backupChunkSizeTarget?: number, ) {} } diff --git a/packages/browserExtension/src/shared/utils/ConfigProvider.ts b/packages/browserExtension/src/shared/utils/ConfigProvider.ts index 2328c121cc..067c59800a 100644 --- a/packages/browserExtension/src/shared/utils/ConfigProvider.ts +++ b/packages/browserExtension/src/shared/utils/ConfigProvider.ts @@ -21,6 +21,7 @@ declare const __CERAMIC_NODE_URL__: URLString; declare const __CONTROL_CHAIN_PROVIDER_URL__: ProviderUrl; declare const __REQUEST_FOR_DATA_EVENT_FREQ__: string; declare const __DOMAIN_FILTER__: string; +declare const __BACKUP_CHUNK_SIZE__: string; class ConfigProvider implements IConfigProvider { protected extensionConfig: ExtensionConfig; @@ -51,6 +52,9 @@ class ConfigProvider implements IConfigProvider { __DNS_SERVER_ADDRESS__ === "" ? undefined : __DNS_SERVER_ADDRESS__, Number.parseInt(__REQUEST_FOR_DATA_EVENT_FREQ__), __DOMAIN_FILTER__ === "" ? undefined : __DOMAIN_FILTER__, + __BACKUP_CHUNK_SIZE__ === "" + ? undefined + : Number.parseInt(__BACKUP_CHUNK_SIZE__), ); } public getConfig() { diff --git a/packages/core/src/implementations/utilities/ConfigProvider.ts b/packages/core/src/implementations/utilities/ConfigProvider.ts index 9d1cf6fbd2..881bb15042 100644 --- a/packages/core/src/implementations/utilities/ConfigProvider.ts +++ b/packages/core/src/implementations/utilities/ConfigProvider.ts @@ -79,7 +79,7 @@ export class ConfigProvider 5000, // polling interval balance 5000, // polling interval nfts 60000, // backup interval - 500, // backup chunk size target + 50, // backup chunk size target "ckey_ee277e2a0e9542838cf30325665", // covalent api key "aqy6wZJX3r0XxYP9b8EyInVquukaDuNL9SfVtuNxvPqJrrPon07AvWUmlgOvp5ag", // moralis api key "lusr87vNmTtHGMmktlFyi4Nt", // NftScan api key From 4c913fe6b478d7d3dd8a81cb5b8bed9e825265b4 Mon Sep 17 00:00:00 2001 From: Varun Parthasarathy Date: Wed, 8 Feb 2023 10:46:28 -0800 Subject: [PATCH 3/4] fix import --- packages/objects/src/businessObjects/ChainTransaction.ts | 8 +------- packages/objects/src/businessObjects/EVMTransaction.ts | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/objects/src/businessObjects/ChainTransaction.ts b/packages/objects/src/businessObjects/ChainTransaction.ts index dac7e85260..c04e8a6495 100644 --- a/packages/objects/src/businessObjects/ChainTransaction.ts +++ b/packages/objects/src/businessObjects/ChainTransaction.ts @@ -1,10 +1,4 @@ -import { - AccountAddress, - BigNumberString, - ChainId, - TransactionHash, - UnixTimestamp, -} from "@objects/primitives"; +import { ChainId, TransactionHash, UnixTimestamp } from "@objects/primitives"; export abstract class ChainTransaction { constructor( diff --git a/packages/objects/src/businessObjects/EVMTransaction.ts b/packages/objects/src/businessObjects/EVMTransaction.ts index e50011beae..e70d396b60 100644 --- a/packages/objects/src/businessObjects/EVMTransaction.ts +++ b/packages/objects/src/businessObjects/EVMTransaction.ts @@ -1,11 +1,11 @@ import { Interface } from "ethers/lib/utils"; +import { ChainTransaction } from "@objects/businessObjects/ChainTransaction"; +import { EVMEvent } from "@objects/businessObjects/EVMEvent"; import { - ChainTransaction, - EVMEvent, EVMFunctionParameter, EVMFunctionSignature, -} from "@objects/businessObjects"; +} from "@objects/businessObjects/EVMFunctionSignature"; import { ChainId, EVMAccountAddress, From 46ad89c454082aa574a40d922f3ee26977258022 Mon Sep 17 00:00:00 2001 From: Andrew Strimaitis Date: Tue, 27 Jun 2023 15:31:37 -0700 Subject: [PATCH 4/4] changes --- packages/extension-onboarding/src/constants/tags.ts | 3 ++- .../socialMediaProviders/interfaces/ITwitterProvider.ts | 5 ++--- .../src/core/implementations/utilities/ConfigProvider.ts | 1 + .../src/shared/interfaces/IExtensionConfig.ts | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/extension-onboarding/src/constants/tags.ts b/packages/extension-onboarding/src/constants/tags.ts index c2622d9eaa..eeb2d8aaa3 100644 --- a/packages/extension-onboarding/src/constants/tags.ts +++ b/packages/extension-onboarding/src/constants/tags.ts @@ -1,6 +1,7 @@ -import { ITagItem } from "@extension-onboarding/objects/interfaces/ITagItem"; import { ETag } from "@snickerdoodlelabs/objects"; +import { ITagItem } from "@extension-onboarding/objects/interfaces/ITagItem"; + export const tags: ITagItem[] = [ { tag: ETag.DeFi, diff --git a/packages/extension-onboarding/src/services/socialMediaProviders/interfaces/ITwitterProvider.ts b/packages/extension-onboarding/src/services/socialMediaProviders/interfaces/ITwitterProvider.ts index 4a17a91f6a..dd18f93f96 100644 --- a/packages/extension-onboarding/src/services/socialMediaProviders/interfaces/ITwitterProvider.ts +++ b/packages/extension-onboarding/src/services/socialMediaProviders/interfaces/ITwitterProvider.ts @@ -1,3 +1,4 @@ +import { ISocialMediaProvider } from "@snickerdoodlelabs/extension-onboarding/src/services/socialMediaProviders/interfaces/ISocialMediaProvider"; import { OAuth1RequstToken, TokenAndSecret, @@ -8,8 +9,6 @@ import { } from "@snickerdoodlelabs/objects"; import { ResultAsync } from "neverthrow"; -import { ISocialMediaProvider } from "@extension-onboarding/services/socialMediaProviders/interfaces"; - export type ITwitterInitParams = { requestToken: OAuth1RequstToken; oAuthVerifier: OAuthVerifier; @@ -27,5 +26,5 @@ export interface ITwitterProvider extends ISocialMediaProvider { params: ITwitterUnlinkProfileParams, ): ResultAsync; getUserProfiles(): ResultAsync; - getTwitterApiAuthUrl(tokenAndSecret : TokenAndSecret) : URLString + getTwitterApiAuthUrl(tokenAndSecret: TokenAndSecret): URLString; } diff --git a/packages/synamint-extension-sdk/src/core/implementations/utilities/ConfigProvider.ts b/packages/synamint-extension-sdk/src/core/implementations/utilities/ConfigProvider.ts index f5580f32cc..4eb7d2605c 100644 --- a/packages/synamint-extension-sdk/src/core/implementations/utilities/ConfigProvider.ts +++ b/packages/synamint-extension-sdk/src/core/implementations/utilities/ConfigProvider.ts @@ -30,6 +30,7 @@ const defaultConfigs: IExtensionConfig = { portfolioPollingIntervalMS: ONE_MINUTE_MS, transactionPollingIntervalMS: ONE_MINUTE_MS, backupPollingIntervalMS: ONE_MINUTE_MS, + backupChunkSizeTarget: 500, requestForDataCheckingFrequency: 4000, }; @injectable() diff --git a/packages/synamint-extension-sdk/src/shared/interfaces/IExtensionConfig.ts b/packages/synamint-extension-sdk/src/shared/interfaces/IExtensionConfig.ts index 1dbb58c75f..c397d7c273 100644 --- a/packages/synamint-extension-sdk/src/shared/interfaces/IExtensionConfig.ts +++ b/packages/synamint-extension-sdk/src/shared/interfaces/IExtensionConfig.ts @@ -18,6 +18,7 @@ export interface IExtensionConfigDefaults { portfolioPollingIntervalMS: number; transactionPollingIntervalMS: number; backupPollingIntervalMS: number; + backupChunkSizeTarget: number; requestForDataCheckingFrequency: number; }