Skip to content

Commit

Permalink
fix(api): default expiration 10y if not set for deployment deposit (#377
Browse files Browse the repository at this point in the history
)
  • Loading branch information
baktun14 authored Sep 19, 2024
1 parent a0013d8 commit cab6d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "console-api",
"version": "2.23.1",
"version": "2.23.2",
"description": "Api providing data to the deploy tool",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DepositDeploymentAuthorization } from "@akashnetwork/akash-api/v1beta3"
import { MsgRevoke } from "cosmjs-types/cosmos/authz/v1beta1/tx";
import { BasicAllowance } from "cosmjs-types/cosmos/feegrant/v1beta1/feegrant";
import { MsgGrantAllowance } from "cosmjs-types/cosmos/feegrant/v1beta1/tx";
import addYears from "date-fns/addYears";
import { singleton } from "tsyringe";

export interface SpendingAuthorizationMsgOptions {
Expand Down Expand Up @@ -43,7 +44,7 @@ export class RpcMessageService {
};
}

getDepositDeploymentGrantMsg({ denom, limit, expiration, granter, grantee }: SpendingAuthorizationMsgOptions) {
getDepositDeploymentGrantMsg({ denom, limit, expiration = addYears(new Date(), 10), granter, grantee }: SpendingAuthorizationMsgOptions) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
value: {
Expand Down

0 comments on commit cab6d16

Please sign in to comment.