Skip to content

Commit

Permalink
fix: Migration block height check.
Browse files Browse the repository at this point in the history
  • Loading branch information
paouvrard committed Jul 23, 2024
1 parent adcd103 commit 0f7f592
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ export async function checkSync (
getNearProvider()
if (nearOnEthClientBlockHeight > burnBlockHeight) {
const etherNep141FactoryMigrationHeight = options.etherNep141FactoryMigrationHeight ?? bridgeParams.etherNep141FactoryMigrationHeight
const etherNep141Factory = burnBlockHeight >= etherNep141FactoryMigrationHeight
const etherNep141Factory = burnBlockHeight > etherNep141FactoryMigrationHeight
? (options.etherNep141Factory ?? bridgeParams.etherNep141Factory)
: bridgeParams.auroraEvmAccount
proof = await findNearProof(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ export async function checkSync (
getNearProvider()
if (nearOnEthClientBlockHeight > burnBlockHeight) {
const etherNep141FactoryMigrationHeight = options.etherNep141FactoryMigrationHeight ?? bridgeParams.etherNep141FactoryMigrationHeight
const etherNep141Factory = burnBlockHeight >= etherNep141FactoryMigrationHeight
const etherNep141Factory = burnBlockHeight > etherNep141FactoryMigrationHeight
? (options.etherNep141Factory ?? bridgeParams.etherNep141Factory)
: bridgeParams.auroraEvmAccount
proof = await findNearProof(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ export async function checkSync (
getNearProvider()
if (nearOnEthClientBlockHeight > withdrawBlockHeight) {
const etherNep141FactoryMigrationHeight = options.etherNep141FactoryMigrationHeight ?? bridgeParams.etherNep141FactoryMigrationHeight
const etherNep141Factory = withdrawBlockHeight >= etherNep141FactoryMigrationHeight
const etherNep141Factory = withdrawBlockHeight > etherNep141FactoryMigrationHeight
? (options.etherNep141Factory ?? bridgeParams.etherNep141Factory)
: bridgeParams.auroraEvmAccount
proof = await findNearProof(
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/findProof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export async function selectEtherNep141Factory ({
}): Promise<string> {
const txBlock = await nearProvider.block({ blockId: blockHash })
const blockHeight = Number(txBlock.header.height)
return blockHeight >= etherNep141FactoryMigrationHeight
return blockHeight > etherNep141FactoryMigrationHeight
? etherNep141Factory
: auroraEvmAccount
}

0 comments on commit 0f7f592

Please sign in to comment.