Skip to content

Commit 11e91be

Browse files
committed
fix: add check for legacy network with keyType ed25519
1 parent 6d824dc commit 11e91be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/torus.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ class Torus {
272272
const localKeyType = keyType ?? this.keyType;
273273
const localEc = getKeyCurve(localKeyType);
274274

275+
if (localKeyType === KEY_TYPE.ED25519 && LEGACY_NETWORKS_ROUTE_MAP[this.network as TORUS_LEGACY_NETWORK_TYPE]) {
276+
throw new Error(`keyType: ${keyType} is not supported by ${this.network} network`);
277+
}
278+
275279
const keyAssignResult = await GetPubKeyOrKeyAssign({
276280
endpoints,
277281
network: this.network,

0 commit comments

Comments
 (0)