Skip to content

Commit

Permalink
added updateProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
CoNETProject committed May 22, 2024
1 parent 53d6376 commit a33d764
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/API/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'|
Expand Down
15 changes: 15 additions & 0 deletions src/API/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,21 @@ export class platform {
})
})

public unlock_cCNTP: (profile: profile) => Promise<type_platformStatus> = () => 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<type_platformStatus> = (profile, assetName) => new Promise(async resolve=> {
const cmd: WorkerCommand = {
cmd: 'claimToken',
Expand Down

0 comments on commit a33d764

Please sign in to comment.