mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +08:00
Fix support for new CAIP10 format
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
+3
-2
@@ -1,4 +1,3 @@
|
||||
import { AccountID } from 'caip';
|
||||
import type { EnsProfile } from "@app/base/registrations/registrar";
|
||||
import type { BasicProfile } from '@datamodels/identity-profile-basic';
|
||||
import {
|
||||
@@ -90,7 +89,9 @@ export class Profile {
|
||||
const addr = this.profile?.ens?.anchorsAccount;
|
||||
|
||||
if (addr) {
|
||||
const id = new AccountID(addr);
|
||||
// TODO: Workaround until caip package supports both CAIP10 formats.
|
||||
const [namespace, reference, address] = addr.split(":");
|
||||
const id = { "chainId": { namespace, reference }, address };
|
||||
|
||||
// Ethereum address.
|
||||
if (typeof id.chainId === "object" && id.chainId.namespace === "eip155") {
|
||||
|
||||
Reference in New Issue
Block a user