Skip to content

Commit

Permalink
fix: reverted changes from apps/node/src/index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
muzaffarbhat07 committed Oct 8, 2024
1 parent 66875c1 commit 7d6c7f1
Showing 1 changed file with 5 additions and 41 deletions.
46 changes: 5 additions & 41 deletions apps/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { setEthersLib } from '@cypherock/sdk-app-evm';
import { setNearApiJs } from '@cypherock/sdk-app-near';
import { setSolanaWeb3 } from '@cypherock/sdk-app-solana';
import { ethers } from 'ethers';
import { setXrpLib, XrpApp } from '@cypherock/sdk-app-xrp';
import * as xrpl from 'xrpl';
import { createServiceLogger } from './logger';

const run = async () => {
Expand All @@ -26,7 +24,6 @@ const run = async () => {
setEthersLib(ethers);
setNearApiJs(nearApiJs);
setSolanaWeb3(solanaWeb3);
setXrpLib(xrpl);

let connection: IDeviceConnection;

Expand All @@ -38,48 +35,15 @@ const run = async () => {

const managerApp = await ManagerApp.create(connection);

// const deviceInfo = await managerApp.getDeviceInfo();
const deviceInfo = await managerApp.getDeviceInfo();

// console.log(deviceInfo);
console.log(deviceInfo);

const wallets = await managerApp.getWallets();
const wallet = wallets.walletList[0];
await managerApp.authDevice();

console.log({ wallet });
await managerApp.trainCard({ onWallets: async () => true });

const xrpApp = await XrpApp.create(connection);

const resultPubKey = await xrpApp.getPublicKeys({
walletId: wallet.id,
derivationPaths: [
{
path: [0x80000000 + 44, 0x80000000 + 144, 0x80000000, 0, 0],
},
{
path: [0x80000000 + 44, 0x80000000 + 144, 0x80000000, 0, 1],
},
{
path: [0x80000000 + 44, 0x80000000 + 144, 0x80000000, 0, 2],
},
],
});

console.log({ resultPubKey });

// const resultUserVerifiedPubKey = await xrpApp.getUserVerifiedPublicKey({
// walletId: wallet.id,
// derivationPath: [0x80000000 + 44, 0x80000000 + 144, 0x80000000, 0, 0]
// })

// console.log({ resultUserVerifiedPubKey });

await xrpApp.destroy();

// await managerApp.authDevice();

// await managerApp.trainCard({ onWallets: async () => true });

// await managerApp.authCard();
await managerApp.authCard();

// await managerApp.updateFirmware({
// getDevices: async () => [
Expand Down

0 comments on commit 7d6c7f1

Please sign in to comment.