Skip to content

Commit efe42e0

Browse files
fix: BSM detection to be chain-specific (#390)
* fix: BSM detection to be chain-specific * [bot] New pkg version: 1.5.4 * Trigger Build --------- Co-authored-by: GitHub Actions <actions@github.com>
1 parent 460b39b commit efe42e0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@centrifuge/sdk",
3-
"version": "1.5.3",
3+
"version": "1.5.4",
44
"description": "",
55
"homepage": "https://github.com/centrifuge/sdk/tree/main#readme",
66
"author": "",

src/entities/PoolNetwork.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ export class PoolNetwork extends Entity {
242242
throw new Error('OnOffRampManager not found')
243243
}
244244

245-
const bsManagerAddresses = new Set(balanceSheetManagers.map((m) => m.address.toLowerCase()))
245+
const bsManagerAddresses = new Set(
246+
balanceSheetManagers
247+
.filter((m) => m.centrifugeId === this.centrifugeId)
248+
.map((m) => m.address.toLowerCase())
249+
)
246250
const verifiedManagers = deployedOnOffRampManagers.filter((deployed) =>
247251
bsManagerAddresses.has(deployed.address.toLowerCase())
248252
)
@@ -298,7 +302,9 @@ export class PoolNetwork extends Entity {
298302
switchMap(([deployedOnOffRampManager, balanceSheetManagers]) => {
299303
const bsManagers = new Map<string, { address: `0x${string}`; centrifugeId: number; type: string }>()
300304
balanceSheetManagers.forEach((manager) => {
301-
bsManagers.set(manager.address.toLowerCase(), manager)
305+
if (manager.centrifugeId === self.centrifugeId) {
306+
bsManagers.set(manager.address.toLowerCase(), manager)
307+
}
302308
})
303309

304310
const onOffRampManagers = deployedOnOffRampManager

0 commit comments

Comments
 (0)