From 91d4261377a9f26302fc385ff5363af291e66b39 Mon Sep 17 00:00:00 2001 From: Which Node Date: Sun, 11 May 2025 19:03:31 -0600 Subject: [PATCH] Use the right bit of account state --- api/src/ol/account.resolver.ts | 4 ++-- api/src/ol/ol.service.ts | 4 ++-- web-app/src/modules/core/routes/Account/Account.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/ol/account.resolver.ts b/api/src/ol/account.resolver.ts index bda71540..6b287dbf 100644 --- a/api/src/ol/account.resolver.ts +++ b/api/src/ol/account.resolver.ts @@ -37,8 +37,8 @@ export class AccountResolver { } @ResolveField(() => Boolean, { nullable: true }) - public async reauthorized(@Parent() account: Account): Promise { - return this.olService.getReauthorized(account.address); + public async initialized(@Parent() account: Account): Promise { + return this.olService.getInitialized(account.address); } @ResolveField(() => PaginatedMovements) diff --git a/api/src/ol/ol.service.ts b/api/src/ol/ol.service.ts index b3372989..6416411b 100644 --- a/api/src/ol/ol.service.ts +++ b/api/src/ol/ol.service.ts @@ -250,9 +250,9 @@ export class OlService { } } - public async getReauthorized(address: Uint8Array): Promise { + public async getInitialized(address: Uint8Array): Promise { const res = await this.aptosClient.view({ - function: '0x1::reauthorization::is_v8_authorized', + function: '0x1::activity::is_initialized', type_arguments: [], arguments: [`0x${Buffer.from(address).toString('hex')}`], }); diff --git a/web-app/src/modules/core/routes/Account/Account.tsx b/web-app/src/modules/core/routes/Account/Account.tsx index 11a54da0..615b7c4b 100644 --- a/web-app/src/modules/core/routes/Account/Account.tsx +++ b/web-app/src/modules/core/routes/Account/Account.tsx @@ -16,7 +16,7 @@ const GET_ACCOUNT = gql` account(address: $address) { address balance - reauthorized + initialized slowWallet { unlocked }