diff --git a/client/PublicRequestTypes.ts b/client/PublicRequestTypes.ts index 00a992a5..a7901301 100644 --- a/client/PublicRequestTypes.ts +++ b/client/PublicRequestTypes.ts @@ -95,6 +95,7 @@ export interface SignTransactionRequest extends BasicRequest { export interface SignStakingRequest extends SignTransactionRequest { type: number; delegation?: string; + newInactiveBalance?: number; } export interface NimiqCheckoutRequest extends BasicRequest { diff --git a/client/dist/src/PublicRequestTypes.d.ts b/client/dist/src/PublicRequestTypes.d.ts index 1d7caed6..b3af1576 100644 --- a/client/dist/src/PublicRequestTypes.d.ts +++ b/client/dist/src/PublicRequestTypes.d.ts @@ -74,6 +74,7 @@ export interface SignTransactionRequest extends BasicRequest { export interface SignStakingRequest extends SignTransactionRequest { type: number; delegation?: string; + newInactiveBalance?: number; } export interface NimiqCheckoutRequest extends BasicRequest { version?: 1; diff --git a/package.json b/package.json index d41427a9..f4831172 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build", "@nimiq/fastspot-api": "^1.7.0", "@nimiq/iqons": "^1.5.2", - "@nimiq/keyguard-client": "https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&0f3039d7aefd168d15357a1908d1141570cb4ed8", + "@nimiq/keyguard-client": "https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&2b94687a6f09cddc901850dbdcb8759f60c33501", "@nimiq/ledger-api": "^2.3.0", "@nimiq/network-client": "^0.6.2", "@nimiq/oasis-api": "^1.1.1", diff --git a/src/lib/Constants.ts b/src/lib/Constants.ts index e5148d71..5e09812f 100644 --- a/src/lib/Constants.ts +++ b/src/lib/Constants.ts @@ -45,10 +45,12 @@ export const StakingTransactionType = { UNSTAKE: 1, CREATE_STAKER: 5, - STAKE: 6, + ADD_STAKE: 6, UPDATE_STAKER: 7, + SET_INACTIVE_STAKE: 8, }; export const StakingSignallingTypes = [ StakingTransactionType.UPDATE_STAKER, + StakingTransactionType.SET_INACTIVE_STAKE, ]; diff --git a/src/lib/RequestParser.ts b/src/lib/RequestParser.ts index defcabfc..edc905be 100644 --- a/src/lib/RequestParser.ts +++ b/src/lib/RequestParser.ts @@ -85,6 +85,7 @@ export class RequestParser { ...(requestType === RequestType.SIGN_STAKING ? { type: (signTransactionRequest as any as SignStakingRequest).type, delegation: (signTransactionRequest as any as SignStakingRequest).delegation, + newInactiveBalance: (signTransactionRequest as any as SignStakingRequest).newInactiveBalance, } : {}), } as ParsedSignTransactionRequest; case RequestType.CHECKOUT: @@ -725,6 +726,7 @@ export class RequestParser { ...(request.kind === RequestType.SIGN_STAKING ? { type: (signTransactionRequest as any as ParsedSignStakingRequest).type, delegation: (signTransactionRequest as any as ParsedSignStakingRequest).delegation, + newInactiveBalance: (signTransactionRequest as any as ParsedSignStakingRequest).newInactiveBalance, } : {}), } as SignTransactionRequest; case RequestType.CREATE_CASHLINK: diff --git a/src/lib/RequestTypes.ts b/src/lib/RequestTypes.ts index 6c85638c..87216cd7 100644 --- a/src/lib/RequestTypes.ts +++ b/src/lib/RequestTypes.ts @@ -54,6 +54,7 @@ export interface ParsedSignTransactionRequest extends ParsedBasicRequest { export interface ParsedSignStakingRequest extends ParsedSignTransactionRequest { type: number; delegation?: string; + newInactiveBalance?: number; } export type ParsedProtocolSpecificsForCurrency = diff --git a/src/views/SignStaking.vue b/src/views/SignStaking.vue index c8d38fec..8b251260 100644 --- a/src/views/SignStaking.vue +++ b/src/views/SignStaking.vue @@ -94,6 +94,7 @@ export default class SignStaking extends Vue { type: this.request.type, delegation: this.request.delegation, + newInactiveBalance: this.request.newInactiveBalance, }; staticStore.keyguardRequest = request; diff --git a/yarn.lock b/yarn.lock index 8c539165..44ea50b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1512,9 +1512,9 @@ btoa "^1.1.2" node-lmdb "^0.9.6" -"@nimiq/keyguard-client@https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&0f3039d7aefd168d15357a1908d1141570cb4ed8": +"@nimiq/keyguard-client@https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&2b94687a6f09cddc901850dbdcb8759f60c33501": version "1.0.0" - resolved "https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&0f3039d7aefd168d15357a1908d1141570cb4ed8#657f4af9f43beb2a863a719bd5d2bd93c729213d" + resolved "https://gitpkg.vercel.app/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&2b94687a6f09cddc901850dbdcb8759f60c33501#b791150b76ed7cad893fa9b364673308bf0c30ed" "@nimiq/ledger-api@^2.3.0": version "2.3.0"