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 #32 from cosmostation/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Booyoun authored Jan 30, 2020
2 parents 63d452e + 81cd81c commit a7692a5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Cosmostation offers LCD url([https://lcd-cosmos-free.cosmostation.io](https://lc
* API Rate Limiting: 10 requests per second

## Supporting Message Types (Updating...)
- If you need more message types, you can see [SUPPORTING_MSG_TYPES.md](https://github.com/cosmostation/cosmosjs/blob/develop/docs/SUPPORTING_MSG_TYPES.md)
- If you need more message types, you can see [/docs/msg_types](https://github.com/cosmostation/cosmosjs/tree/master/docs/msg_types)

## Documentation

Expand Down
55 changes: 31 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cosmostation/cosmosjs",
"version": "0.5.1",
"description": "A JavasSript Open Source Library for Cosmos Network, IRISnet and Kava",
"version": "0.5.2",
"description": "A JavasSript Open Source Library for Cosmos Network, IRISnet, and Kava",
"main": "./src/index.js",
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ Cosmos.prototype.sign = function(stdSignMsg, ecpairPriv, modeType = "sync") {
},
"mode": modeType
}

// The key of "shares" is using to sign for IRIS Redelegate.
// After signing, you have to replace the "shares" key name to "shares_amount".
// It is an exception to "irishub/stake/BeginRedelegate".
if (stdSignMsg.json.msgs[0].type == "irishub/stake/BeginRedelegate") {
var txBodyStr = JSON.stringify(signedTx);
txBodyStr = txBodyStr.replace("\"shares", "\"shares_amount");
signedTx = JSON.parse(txBodyStr);
}
} else {
signedTx = {
"tx": {
Expand Down

0 comments on commit a7692a5

Please sign in to comment.