Skip to content

Commit

Permalink
chore: Remove reconnection from OmniGraphBuilderHardhat
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Nov 27, 2023
1 parent 861bf42 commit 2fcded4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
22 changes: 2 additions & 20 deletions packages/ua-utils-evm-hardhat-test/test/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@ describe('builder', () => {
config: undefined,
},
],
connections: [
{
vector: { from: vengaboysPoint, to: britneyPoint },
config: undefined,
},
{
vector: { from: britneyPoint, to: vengaboysPoint },
config: undefined,
},
],
connections: [],
})
})

Expand Down Expand Up @@ -78,16 +69,7 @@ describe('builder', () => {
config: undefined,
},
],
connections: [
{
vector: { from: vengaboysPoint, to: britneyPoint },
config: undefined,
},
{
vector: { from: britneyPoint, to: vengaboysPoint },
config: undefined,
},
],
connections: [],
})
})
})
9 changes: 1 addition & 8 deletions packages/ua-utils-evm-hardhat/src/omnigraph/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { HardhatRuntimeEnvironment } from 'hardhat/types'
import { OmniGraphBuilder } from '@layerzerolabs/ua-utils'
import { createNetworkLogger, getNetworkRuntimeEnvironment } from '@layerzerolabs/utils-evm-hardhat'
import { contractNameToPoint } from './coordinates'
import { vectorFromNodes } from '@layerzerolabs/ua-utils'
import { ignoreLoopback } from '@layerzerolabs/ua-utils'

export class OmniGraphBuilderHardhat<TNodeConfig, TEdgeConfig> extends OmniGraphBuilder<TNodeConfig, TEdgeConfig> {
static async fromDeployedContract(
Expand All @@ -30,11 +28,6 @@ export class OmniGraphBuilderHardhat<TNodeConfig, TEdgeConfig> extends OmniGraph
builder.addNodes({ point, config: undefined })
}

return builder.reconnect(
ignoreLoopback((from, to) => ({
vector: vectorFromNodes(from, to),
config: undefined,
}))
)
return builder
}
}

0 comments on commit 2fcded4

Please sign in to comment.