From fc3bc26be8fee29e2fa7d087f62a9237930667ba Mon Sep 17 00:00:00 2001 From: bithighlander Date: Tue, 6 Feb 2024 14:49:52 -0500 Subject: [PATCH] maya work --- .github/workflows/build-electron.yml | 10 ++++---- .../src/controllers/mayachain.ts | 6 ++--- packages/keepkey-sdk-server/src/index.ts | 24 +++++++++++-------- .../src/types/mayachain/index.ts | 4 ++-- packages/keepkey-sdk/package.json | 2 +- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index af432a56c..24ee6bf64 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -70,11 +70,11 @@ jobs: run: | mkdir -p ~/private_keys/ echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 - - name: Linux - Publish packages - if: startsWith(matrix.os, 'ubuntu') - run: yarn publish - env: - YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +# - name: Linux - Publish packages +# if: startsWith(matrix.os, 'ubuntu') +# run: yarn publish +# env: +# YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Linux - Build Electron App if: startsWith(matrix.os, 'ubuntu') run: yarn run release diff --git a/packages/keepkey-sdk-server/src/controllers/mayachain.ts b/packages/keepkey-sdk-server/src/controllers/mayachain.ts index 318e1bb57..e6ea295c7 100644 --- a/packages/keepkey-sdk-server/src/controllers/mayachain.ts +++ b/packages/keepkey-sdk-server/src/controllers/mayachain.ts @@ -46,7 +46,7 @@ export class MayachainController extends ApiController { body.signDoc.fee = { amount: [ { - denom: 'rune', + denom: 'cacao', amount: '0', }, ], @@ -70,10 +70,10 @@ export class MayachainController extends ApiController { sequence: tx.sequence, } // @ts-ignore - console.log('thorchain MSG input: ', JSON.stringify(input)) + console.log('mayachainSignTx MSG input: ', JSON.stringify(input)) const response = await this.context.wallet.mayachainSignTx(input) // @ts-ignore - console.log('thorchain MSG SignDoc: ', JSON.stringify(body)) + console.log('mayachainSignTx MSG SignDoc: ', JSON.stringify(body)) return { signature: response.signatures[0], serialized: response.serialized, diff --git a/packages/keepkey-sdk-server/src/index.ts b/packages/keepkey-sdk-server/src/index.ts index 384e75239..28ce0e642 100644 --- a/packages/keepkey-sdk-server/src/index.ts +++ b/packages/keepkey-sdk-server/src/index.ts @@ -26,16 +26,20 @@ export function RegisterRoutes(app: express.Router) { }) } if (err instanceof HDWalletError) { - if (err instanceof ActionCancelled) { - return res.status(500).json({ - message: err.message, - name: err.name, - type: err.type, - failure_type: Types.FailureType.FAILURE_ACTIONCANCELLED, - }) - } else { - return res.status(500).json({ message: err.message, name: err.name, type: err.type }) - } + // @ts-ignore + console.log("ActionCancelled: ",ActionCancelled) + console.log("Types: ",Types) + //NERFED debugging node.js ActionCancelled error + // if (err instanceof ActionCancelled) { + // return res.status(500).json({ + // message: err.message, + // name: err.name, + // type: err.type, + // failure_type: Types.FailureType.FAILURE_ACTIONCANCELLED, + // }) + // } else { + // return res.status(500).json({ message: err.message, name: err.name, type: err.type }) + // } } else if (err && typeof err === 'object' && 'from_wallet' in err) { assume(err) switch (err.message_enum) { diff --git a/packages/keepkey-sdk-server/src/types/mayachain/index.ts b/packages/keepkey-sdk-server/src/types/mayachain/index.ts index 4ffe0f838..92e73c80a 100644 --- a/packages/keepkey-sdk-server/src/types/mayachain/index.ts +++ b/packages/keepkey-sdk-server/src/types/mayachain/index.ts @@ -6,7 +6,7 @@ export type Coin = { denom: string } -export type StdTxDeposit = { +export type StdTxDepositMaya = { type: 'mayachain/MsgDeposit' value: { coins: any @@ -25,7 +25,7 @@ export type SignDocDeposit = { * @minItems 1 * @maxItems 1 */ - msgs: StdTxDeposit[] + msgs: StdTxDepositMaya[] fee: { amount: any gas: types.decimal.U64 diff --git a/packages/keepkey-sdk/package.json b/packages/keepkey-sdk/package.json index c9d7a3aad..4627a57c4 100644 --- a/packages/keepkey-sdk/package.json +++ b/packages/keepkey-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@keepkey/keepkey-sdk", - "version": "0.2.56", + "version": "0.2.57", "license": "MIT", "repository": { "type": "git",