Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #75 from cosmostation/develop
Browse files Browse the repository at this point in the history
removed msgs[0] in irishub json format.
  • Loading branch information
Booyoun authored Oct 29, 2020
2 parents 14114dd + 8ae6126 commit 288e8f8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

<p align="center">
Expand Down
4 changes: 2 additions & 2 deletions example/irishub.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ iris.getAccounts(address).then(data => {
chain_id: chainId,
fee: { amount: [ { amount: String(400000000000000000), denom: "iris-atto" } ], gas: String(50000) },
memo: "",
account_number: String(data.result.value.account_number),
sequence: String(data.result.value.sequence)
account_number: String(data.value.account_number),
sequence: String(data.value.sequence)
});

const signedTx = iris.sign(stdSignMsg, ecpairPriv);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmostation/cosmosjs",
"version": "0.6.11",
"version": "0.6.12",
"description": "A JavasSript Open Source Library for Cosmos Network, IRISnet, Kava, Band Protocol, Starname and Secret Network. (HTML developers can use /dist/cosmos.js)",
"main": "./src/index.js",
"repository": {
Expand Down
30 changes: 15 additions & 15 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ Cosmos.prototype.newStdMsg = function(input) {
]
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
} else if (input.msgs[0].type == "irishub/stake/BeginUnbonding") {
stdSignMsg.jsonForSigningIrisTx =
Expand All @@ -162,11 +162,11 @@ Cosmos.prototype.newStdMsg = function(input) {
validator_addr: input.msgs[0].value.validator_addr
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
} else if (input.msgs[0].type == "irishub/stake/BeginRedelegate") {
stdSignMsg.jsonForSigningIrisTx =
Expand All @@ -179,11 +179,11 @@ Cosmos.prototype.newStdMsg = function(input) {
shares: String(input.msgs[0].value.shares_amount) + ".0000000000" // IRIS Exception) For signing, shares is correct.
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
}

Expand Down

0 comments on commit 288e8f8

Please sign in to comment.