-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement: dont await confirmation of eth transaction (#2827)
* enhancement: dont await confirmation of eth transaction * refactor: evmConfirmationPoll to use subscribe * fix: supports block polling/subscription, prevents race condition * refactor: average block time and blocks until confirmed * pr review fixes --------- Co-authored-by: Nicole O'Brien <[email protected]>
- Loading branch information
1 parent
67b2f34
commit f1e6392
Showing
21 changed files
with
247 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
packages/shared/src/lib/core/network/constants/average-block-time-in-seconds.constant.ts
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/shared/src/lib/core/network/constants/confirmation-threshold.constant.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/shared/src/lib/core/network/constants/failed-confirmation.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const FAILED_CONFIRMATION = -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/shared/src/lib/core/profile/constants/profile-version.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { AppStage } from '@core/app/enums' | ||
|
||
export const PROFILE_VERSION: Record<AppStage, number> = { | ||
[AppStage.ALPHA]: 26, | ||
[AppStage.ALPHA]: 27, | ||
[AppStage.BETA]: 1, | ||
[AppStage.PROD]: 15, | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/shared/src/lib/core/profile/migrations/alpha/alpha-profile-migration-26-to-27.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { DEFAULT_EVM_NETWORK_CONFIGURATION, DEFAULT_ISC_CHAINS_CONFIGURATIONS, StardustNetworkId } from '@core/network' | ||
import { IPersistedProfile } from '@core/profile/interfaces' | ||
|
||
export function alphaProfileMigration26To27(existingProfile: unknown): Promise<void> { | ||
const profile = existingProfile as IPersistedProfile & { | ||
network: { | ||
id: StardustNetworkId | ||
} | ||
} | ||
|
||
profile.network.chainConfigurations.forEach((chainConfiguration) => { | ||
chainConfiguration.blocksUntilConfirmed = | ||
DEFAULT_ISC_CHAINS_CONFIGURATIONS[profile.network.id]?.blocksUntilConfirmed ?? 0 | ||
}) | ||
|
||
profile.evmNetworks.forEach((evmNetwork) => { | ||
evmNetwork.blocksUntilConfirmed = DEFAULT_EVM_NETWORK_CONFIGURATION[evmNetwork.id]?.blocksUntilConfirmed ?? 0 | ||
}) | ||
|
||
return Promise.resolve() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.