Skip to content

Commit feadca7

Browse files
author
ScottyPoi
committed
RPC: repeat fix for other subnetworks
1 parent 8a8a954 commit feadca7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/cli/src/rpc/modules/portal.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ export class portal {
11741174
const contentValues = contentItems.map((item) => hexToBytes(item[1]))
11751175
const enr = ENR.decodeTxt(enrHex)
11761176
const res = await this._state.sendOffer(enr, contentKeys, contentValues)
1177+
if (res === undefined) {
1178+
return '0x'
1179+
}
11771180
return res instanceof BitArray ? bytesToHex(res.uint8Array) : bytesToHex(res)
11781181
}
11791182
async beaconOffer(
@@ -1184,6 +1187,9 @@ export class portal {
11841187
const contentValues = contentItems.map((item) => hexToBytes(item[1]))
11851188
const enr = ENR.decodeTxt(enrHex)
11861189
const res = await this._beacon.sendOffer(enr, contentKeys, contentValues)
1190+
if (res === undefined) {
1191+
return '0x'
1192+
}
11871193
return res instanceof BitArray ? bytesToHex(res.uint8Array) : bytesToHex(res)
11881194
}
11891195

0 commit comments

Comments
 (0)