From 8b61c24cdbee51a683348531007499934d194314 Mon Sep 17 00:00:00 2001 From: Vaibhav Sethia Date: Mon, 29 Jul 2024 14:03:00 +0530 Subject: [PATCH] fix: setup test data --- apps/node/src/index.ts | 10 +++++-- packages/app-inheritance/src/app.ts | 4 +++ .../app-inheritance/src/operations/index.ts | 1 + .../src/operations/setup/index.ts | 28 ++++--------------- submodules/common | 2 +- 5 files changed, 18 insertions(+), 27 deletions(-) diff --git a/apps/node/src/index.ts b/apps/node/src/index.ts index 3249cd7c..a9741a0d 100644 --- a/apps/node/src/index.ts +++ b/apps/node/src/index.ts @@ -38,7 +38,6 @@ const run = async () => { const iApp = await InheritanceApp.create(connection); const mApp = await ManagerApp.create(connection); - const wallets = await mApp.getWallets(); const params : IWalletSignParams = { challenge: wallets.walletList[0].id, @@ -51,10 +50,15 @@ const run = async () => { // ]), isPublickey: true } + console.log(wallets.walletList[0].id); + + + // const challengeresponse = await iApp.getWalletAuth(params); - const challengeresponse = await iApp.getWalletAuth(params); + // console.log(challengeresponse); - console.log(challengeresponse); + const setup_result = await iApp.getSetup(); + console.log(setup_result); // await managerApp.authDevice(); diff --git a/packages/app-inheritance/src/app.ts b/packages/app-inheritance/src/app.ts index 9f3952e1..c0837ff8 100644 --- a/packages/app-inheritance/src/app.ts +++ b/packages/app-inheritance/src/app.ts @@ -22,6 +22,10 @@ export class InheritanceApp { ); } + public async getSetup() { + return this.sdk.runOperation(() => operations.getSetup(this.sdk)); + } + public async destroy() { return this.sdk.destroy(); } diff --git a/packages/app-inheritance/src/operations/index.ts b/packages/app-inheritance/src/operations/index.ts index c0331b80..c5958e31 100644 --- a/packages/app-inheritance/src/operations/index.ts +++ b/packages/app-inheritance/src/operations/index.ts @@ -1 +1,2 @@ export * from './walletAuth'; +export * from './setup'; diff --git a/packages/app-inheritance/src/operations/setup/index.ts b/packages/app-inheritance/src/operations/setup/index.ts index a63714a3..acc2ff37 100644 --- a/packages/app-inheritance/src/operations/setup/index.ts +++ b/packages/app-inheritance/src/operations/setup/index.ts @@ -26,35 +26,17 @@ export const getSetup = async (sdk: ISDK): Promise => { // TODO: add vars to parameters await helper.sendQuery({ plainData: [ - { - message: hexToUint8Array('Shortest'), - isPrivate: false, - }, - { - message: hexToUint8Array( - 'This is a slightly longer message to test the 50 characters length requirement.', - ), - isPrivate: false, - }, - { - message: hexToUint8Array( - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', - ), - isPrivate: false, - }, - { - message: hexToUint8Array( - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', - ), - isPrivate: false, - }, { message: hexToUint8Array( - "Embarking on a journey to write a 900-character piece necessitates precision and clarity, ensuring each word contributes to the overall message. Begin by defining the central theme or purpose, whether it's to inform, persuade, or entertain. Structure is crucial: start with an engaging introduction to hook the reader, followed by the main content divided into concise paragraphs, and conclude with a memorable closing statement. Use active voice and vary sentence lengths to maintain reader interest. Edit ruthlessly to eliminate redundant words and ensure each sentence flows seamlessly into the next. Pay attention to grammar and punctuation, as these details enhance readability and professionalism. Finally, read the piece aloud to catch any awkward phrasing or overlooked errors, ensuring the final draft is polished and impactful. This approach not only adheres to the character limit of msgs.", + 'e7b9f8e2d4735a78c2d5f4b6a5d8e9a4f3c6b5a4d3f9c8b7e6a4b3c2d1e0f7a65', ), isPrivate: false, }, ], + walletId: new Uint8Array([ + 144, 213, 122, 213, 228, 193, 104, 222, 201, 19, 75, 27, 117, 55, 36, 46, + 87, 72, 90, 53, 41, 121, 48, 132, 163, 239, 183, 51, 61, 251, 171, 30, + ]), }); const result = await helper.waitForResult(); diff --git a/submodules/common b/submodules/common index db1a8402..96769afa 160000 --- a/submodules/common +++ b/submodules/common @@ -1 +1 @@ -Subproject commit db1a8402bc3158fb6545baceb7c014c78da8fbf2 +Subproject commit 96769afa8e032789fc89f6dd9bfe55dd1b68f06c