Skip to content

Commit

Permalink
fix: abstraction removal
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Aug 5, 2021
1 parent 5c2c810 commit f9ceb3c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
11 changes: 11 additions & 0 deletions packages/chain-consumer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.0.68](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/chain-consumer@0.0.67...@injectivelabs/chain-consumer@0.0.68) (2021-08-05)


### Bug Fixes

* abstraction removal ([a8e19fe](https://github.com/InjectiveLabs/injective-ts/commit/a8e19fe11d90c9d957ca543db07957a36816e484))





## [0.0.67](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/chain-consumer@0.0.66...@injectivelabs/chain-consumer@0.0.67) (2021-08-05)

**Note:** Version bump only for package @injectivelabs/chain-consumer
Expand Down
2 changes: 1 addition & 1 deletion packages/chain-consumer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/chain-consumer",
"description": "Interacting with our Chain API made easy. Can be reused throughout Injective's projects.",
"version": "0.0.67",
"version": "0.0.68",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
13 changes: 6 additions & 7 deletions packages/chain-consumer/src/composers/StakingComposer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { AccountAddress } from '@injectivelabs/ts-types'
import { BigNumberInWei } from '@injectivelabs/utils'
import { Coin } from '@injectivelabs/chain-api/cosmos/base/v1beta1/coin_pb'
import snakeCaseKeys from 'snakecase-keys'
import {
Expand All @@ -18,11 +17,11 @@ export class StakingComposer {
denom: string
validatorAddress: string
injectiveAddress: AccountAddress
amount: BigNumberInWei
amount: string
}): Record<string, any> {
const coinAmount = new Coin()
coinAmount.setDenom(denom)
coinAmount.setAmount(amount.toFixed())
coinAmount.setAmount(amount)

const cosmosMessage = new MsgDelegate()
cosmosMessage.setAmount(coinAmount)
Expand All @@ -46,11 +45,11 @@ export class StakingComposer {
sourceValidatorAddress: string
destinationValidatorAddress: string
injectiveAddress: AccountAddress
amount: BigNumberInWei
amount: string
}): Record<string, any> {
const coinAmount = new Coin()
coinAmount.setDenom(denom)
coinAmount.setAmount(amount.toFixed())
coinAmount.setAmount(amount)

const cosmosMessage = new MsgBeginRedelegate()
cosmosMessage.setAmount(coinAmount)
Expand All @@ -73,11 +72,11 @@ export class StakingComposer {
denom: string
validatorAddress: string
injectiveAddress: AccountAddress
amount: BigNumberInWei
amount: string
}): Record<string, any> {
const coinAmount = new Coin()
coinAmount.setDenom(denom)
coinAmount.setAmount(amount.toFixed())
coinAmount.setAmount(amount)

const cosmosMessage = new MsgUndelegate()
cosmosMessage.setAmount(coinAmount)
Expand Down

0 comments on commit f9ceb3c

Please sign in to comment.