Skip to content

Commit

Permalink
maya work
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Feb 6, 2024
1 parent 8158148 commit fc3bc26
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/keepkey-sdk-server/src/controllers/mayachain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class MayachainController extends ApiController {
body.signDoc.fee = {
amount: [
{
denom: 'rune',
denom: 'cacao',
amount: '0',
},
],
Expand All @@ -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,
Expand Down
24 changes: 14 additions & 10 deletions packages/keepkey-sdk-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<core.Event>(err)
switch (err.message_enum) {
Expand Down
4 changes: 2 additions & 2 deletions packages/keepkey-sdk-server/src/types/mayachain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Coin = {
denom: string
}

export type StdTxDeposit = {
export type StdTxDepositMaya = {
type: 'mayachain/MsgDeposit'
value: {
coins: any
Expand All @@ -25,7 +25,7 @@ export type SignDocDeposit = {
* @minItems 1
* @maxItems 1
*/
msgs: StdTxDeposit[]
msgs: StdTxDepositMaya[]
fee: {
amount: any
gas: types.decimal.U64
Expand Down
2 changes: 1 addition & 1 deletion packages/keepkey-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keepkey/keepkey-sdk",
"version": "0.2.56",
"version": "0.2.57",
"license": "MIT",
"repository": {
"type": "git",
Expand Down

0 comments on commit fc3bc26

Please sign in to comment.