Skip to content

Commit

Permalink
Release (#446)
Browse files Browse the repository at this point in the history
* PLT-846 - fix fee

* PLT-846 - fix fee

Co-authored-by: ssramko <[email protected]>
  • Loading branch information
samuelsramko and ssramko authored Mar 15, 2022
1 parent cb5dd9d commit e496609
Show file tree
Hide file tree
Showing 32 changed files with 43 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/api-client",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/algo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/algo",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"type": "commonjs",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/bch/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/bch",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/bsc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/bsc",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/btc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/btc",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/celo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/celo",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/doge/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/doge",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/eth/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/eth",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/flow/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/flow",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/kcs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/kcs",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/klaytn/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/klaytn",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/ltc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/ltc",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/one/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/one",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/polygon/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/polygon",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/solana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/solana",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"type": "commonjs",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/terra/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/terra",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
10 changes: 10 additions & 0 deletions packages/blockchain/terra/src/lib/__tests__/terra.tx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { terraTxService } from '../services/terra.tx'
import { REPLACE_ME_WITH_TATUM_API_KEY } from '@tatumio/shared-testing-common'
import { Currency } from '@tatumio/api-client'
import { Tx } from '@terra-money/terra.js'
import { terraClient } from '../services/terra.client'

jest.mock('@tatumio/api-client')
jest.setTimeout(15000)

describe('TerraSDK - TX', () => {
const txService = terraTxService({
Expand Down Expand Up @@ -38,6 +40,14 @@ describe('TerraSDK - TX', () => {
expect(tx.body.messages[0]['from_address']).toBe(ACCOUNT)
expect(tx.body.messages[0]['to_address']).toBe(ACCOUNT)
expect(tx.body.messages[0]['amount']._coins.uluna.denom).toBe('uluna')

// const broadcasted = await terraClient({
// apiKey: REPLACE_ME_WITH_TATUM_API_KEY,
// provider: 'https://bombay-lcd.terra.dev',
// })
// .getClient(true)
// .tx.broadcast(tx)
// expect(broadcasted['code']).toBe(0)
})

it('secret does not match', async () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/blockchain/terra/src/lib/services/terra.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export const terraTxService = (args: SDKArguments) => {
switch (body.currency) {
case Currency.LUNA_KRT:
amount.ukrt = new BigNumber(body.amount).multipliedBy(1000000).toNumber()
fee.ukrt = new BigNumber(body.fee || 200000).multipliedBy(1000000).toNumber()
fee.ukrt = new BigNumber(body.fee || '20').multipliedBy(1000000).toNumber()
break
case Currency.LUNA:
amount.uluna = new BigNumber(body.amount).multipliedBy(1000000).toNumber()
fee.uluna = new BigNumber(body.fee || 200000).multipliedBy(1000000).toNumber()
fee.uluna = new BigNumber(body.fee || '0.02').multipliedBy(1000000).toNumber()
break
case Currency.LUNA_UST:
amount.uust = new BigNumber(body.amount).multipliedBy(1000000).toNumber()
fee.uust = new BigNumber(body.fee || 200000).multipliedBy(1000000).toNumber()
fee.uust = new BigNumber(body.fee || '0.02').multipliedBy(1000000).toNumber()
break
}
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/tron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tron",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"type": "commonjs",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/xlm/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/xlm",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/xrp/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/xrp",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/sdk",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/abstract-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-abstract-sdk",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/blockchain/abstract/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-blockchain-abstract",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/blockchain/btc-based/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-blockchain-btc-based",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/blockchain/evm-based/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-blockchain-evm-based",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-core",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/testing/btc-based/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-testing-btc-based",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/testing/common/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-testing-common",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/testing/evm-based/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-testing-evm-based",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/shared/testing/xrp-based/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/shared-testing-xrp-based",
"version": "2.0.1-alpha.240",
"version": "2.0.1-alpha.241",
"license": "MIT"
}

0 comments on commit e496609

Please sign in to comment.