From a33d7648130b49a9b16dd93265b0ae07b2d54d47 Mon Sep 17 00:00:00 2001 From: CoNET Project Date: Wed, 22 May 2024 10:43:06 -0700 Subject: [PATCH] added updateProfile --- src/API/index.ts | 2 +- src/API/platform.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/API/index.ts b/src/API/index.ts index b07418d..f03dd4f 100644 --- a/src/API/index.ts +++ b/src/API/index.ts @@ -6,7 +6,7 @@ type WorkerCommandErrorType = 'NOT_READY'|'INVALID_DATA'| 'NO_UUID'|'INVALID_COMMAND'|'OPENPGP_RUNNING_ERROR'| 'PouchDB_ERROR'|'GENERATE_PASSCODE_ERROR'|'FAILURE'|'COUNTDOWN' -type WorkerCommandType = 'READY'|'testPasscode'|'getCONETBalance'|'getRegiestNodes'| +type WorkerCommandType = 'READY'|'testPasscode'|'getCONETBalance'|'getRegiestNodes'|'unlock_cCNTP'| 'encrypt_createPasscode'|'encrypt_lock'|'encrypt_deletePasscode'|'storePreferences'| 'newProfile'|'invitation'|'WORKER_MESSAGE'|'startProxy'|'createAccount'| 'isAddress'|'getFaucet'|'syncAsset'|'sendAsset'|'getUSDCPrice'|'registerReferrer'|'showSRP'|'getAllProfiles'| diff --git a/src/API/platform.ts b/src/API/platform.ts index 503b85c..66dc0ff 100644 --- a/src/API/platform.ts +++ b/src/API/platform.ts @@ -458,6 +458,21 @@ export class platform { }) }) + public unlock_cCNTP: (profile: profile) => Promise = () => new Promise(async resolve=> { + const cmd: WorkerCommand = { + cmd: 'unlock_cCNTP', + uuid: v4(), + data: [] + } + return postMessage (cmd, false, null, (err: any, data: any) => { + if (err) { + return resolve (err) + } + + return resolve (data[0]) + }) + }) + public claimToken: (profile: profile, assetName: string) => Promise = (profile, assetName) => new Promise(async resolve=> { const cmd: WorkerCommand = { cmd: 'claimToken',