Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
finish msg convert coin
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamle2 committed Jun 3, 2022
1 parent 864ac74 commit 7dd9db8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions packages/transactions/src/messages/msgConvertCoin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createTxRaw } from '@tharsis/proto'
import Long from 'long'
import Cosmos from '@oraichain/cosmosjs'
import { createMessageConvertCoin } from './msgConvertCoin'
import { kwtToEth } from '@tharsis/address-converter'

describe('msgConvertCoin tests', () => {
it('valid', async () => {
Expand All @@ -14,6 +15,11 @@ describe('msgConvertCoin tests', () => {
const childKey = cosmos.getChildKey(
'orange find liar team unknown fish floor swamp repair firm tribe announce basic pluck giant same armor dumb sugar coyote spice rain cable harbor',
)

console.log(kwtToEth("oraie1rk46w4qgccgyw4un00pt3hn29rnvl29qsjvx5l"))

console.log(Buffer.from('034FBCA34A334DEEA60EB07DC638B22172A1B63B6F604C4B2030BD17318F2385A5', 'hex').toString('base64'))

const address = cosmos.getAddress(childKey)
console.log('address: ', address)

Expand Down
8 changes: 1 addition & 7 deletions packages/transactions/src/messages/msgConvertCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function createMsgConvertCoin(
toAddress: string,
) {
return {
type: '/evmos.erc20.v1.MsgConvertCoin',
type: 'cosmos-sdk/MsgConvertCoin',
value: {
coin: {
denom,
Expand Down Expand Up @@ -74,12 +74,6 @@ export function createMessageConvertCoin(
params.destinationAddress,
)

// const msg = createMsgSend(
// params.amount,
// params.denom,
// sender.accountAddress,
// params.destinationAddress,
// )
const messages = generateMessage(
sender.accountNumber.toString(),
sender.sequence.toString(),
Expand Down

0 comments on commit 7dd9db8

Please sign in to comment.