diff --git a/src/libs/blockchain/gcr/gcr_routines/identityManager.ts b/src/libs/blockchain/gcr/gcr_routines/identityManager.ts index 9b398ab4f..922d52b0d 100644 --- a/src/libs/blockchain/gcr/gcr_routines/identityManager.ts +++ b/src/libs/blockchain/gcr/gcr_routines/identityManager.ts @@ -15,6 +15,7 @@ import { TON, XRPL, BTC, + APTOS, } from "@kynesyslabs/demosdk/xm-localsdk" // TODO: refactor import to use high level abstraction module @@ -47,6 +48,7 @@ const chains: { [key: string]: typeof DefaultChain } = { near: NEAR, // @ts-expect-error - BTC module contains more fields than the DefaultChain type btc: BTC, + aptos: APTOS, } export default class IdentityManager { @@ -164,6 +166,15 @@ export default class IdentityManager { // } // } + // SECTION: APTOS Checks + // INFO: Check if the subchain is mainnet + if (chain === "aptos" && subchain !== "mainnet") { + return { + ...response, + message: "Failed: Testnet addresses are not supported", + } + } + return { ...response, success: true, @@ -207,7 +218,8 @@ export default class IdentityManager { chainId === "xrpl" || chainId === "ton" || chainId === "ibc" || - chainId === "near" + chainId === "near" || + chainId === "aptos" ) { messageVerified = await sdk.verifyMessage( signedData, @@ -278,9 +290,9 @@ export default class IdentityManager { success: true, message: `Signature proof${ payloads.length > 1 ? "s" : "" - } verified. ${JSON.stringify( - payloads.map(p => p.algorithm), - )} identities assigned`, + } verified. ${JSON.stringify( + payloads.map(p => p.algorithm), + )} identities assigned`, } }