Skip to content

Commit 307d46e

Browse files
committed
fix: claimNetwork will error if a claim already exists
1 parent dad931d commit 307d46e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/nodes/NodeManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,12 @@ class NodeManager<Manifest extends AgentClientManifestNodeManager> {
18751875
network,
18761876
targetNodeId,
18771877
);
1878+
1879+
// Error out if a network access claim already exists
1880+
if (await this.getClaimNetworkAccess(network, tran) != null) {
1881+
throw new Error('TMP network access claim already exists')
1882+
}
1883+
18781884
const encodedNetworkAuthority = claimsUtils.generateSignedClaim(
18791885
claimNetworkAuthority.toSigned(),
18801886
);

0 commit comments

Comments
 (0)