Skip to content

Commit

Permalink
Fix the order of message structure
Browse files Browse the repository at this point in the history
  • Loading branch information
robot-ux committed Feb 28, 2024
1 parent 583bc31 commit 442286a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/api-docs/classes/bncclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ get open orders for an address

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`address` | string | this.address! | binance address |
`address` | string | this.address! | bnb address |

**Returns:** *Promise‹object | never[]*

Expand Down Expand Up @@ -465,7 +465,7 @@ Name | Type | Default | Description |

**Returns:** *Promise‹object | never[]*

resolves with http response ([more details](https://docs.bnbchain.org/docs/beaconchain/develop/api-reference/dex-api/block-service/#apiv1txs))
resolves with http response ([more details](https://docs.binance.org/api-reference/dex-api/block-service.html#apiv1txs))
```js
// Example:
const client = new BncClient('https://testnet-api.binance.org')
Expand Down
12 changes: 6 additions & 6 deletions src/types/msg/stake/stakeMigrationMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ export class StakeMigrationMsg extends BaseMsg {
getSignMsg() {
const { denom, amount } = this.amount
const signMsg: SignedStakeMigrationMsg = {
delegator_addr: this.delegator_addr,
validator_src_addr: this.validator_src_addr,
validator_dst_addr: this.validator_dst_addr,
amount: { denom, amount: String(amount) },
delegator_addr: this.delegator_addr,
refund_addr: this.refund_addr,
amount: { denom, amount: String(amount) },
}

return {
Expand All @@ -65,11 +65,11 @@ export class StakeMigrationMsg extends BaseMsg {

getMsg() {
const data: StakeMigrationData = {
delegator_addr: Buffer.from(this.delegator_addr.slice(2), "hex"),
validator_src_addr: crypto.decodeAddress(this.validator_src_addr),
validator_dst_addr: Buffer.from(this.validator_dst_addr.slice(2), "hex"),
amount: this.amount,
delegator_addr: Buffer.from(this.delegator_addr.slice(2), "hex"),
refund_addr: crypto.decodeAddress(this.refund_addr),
amount: this.amount,
aminoPrefix: AminoPrefix.MsgSideChainStakeMigration,
}

Expand All @@ -78,11 +78,11 @@ export class StakeMigrationMsg extends BaseMsg {

static defaultMsg() {
return {
delegator_addr: Buffer.from(""),
validator_src_addr: Buffer.from(""),
validator_dst_addr: Buffer.from(""),
amount: [{ denom: "", amount: 0 }],
delegator_addr: Buffer.from(""),
refund_addr: Buffer.from(""),
amount: [{ denom: "", amount: 0 }],
aminoPrefix: AminoPrefix.MsgSideChainStakeMigration,
}
}
Expand Down

0 comments on commit 442286a

Please sign in to comment.