Skip to content

Commit

Permalink
fix(aptos): fix import order (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Apr 26, 2024
1 parent 6901569 commit 2d6a383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/src/aptos/ext/coin-event.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Event, UserTransactionResponse, WriteSetChangeWriteResource } from '@aptos-labs/ts-sdk'
import { coin } from '../builtin/0x1.js'
import { coin } from '@sentio/sdk/aptos/builtin/0x1'
import { parseMoveType } from '../../move/index.js'

export function findNewCoinBalances(evt: Event, tx: UserTransactionResponse, coin: string): coin.Coin<any> | undefined {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/aptos/ext/coin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fetch from 'node-fetch'
import { accountTypeString, parseMoveType, SPLITTER } from '@typemove/move'
import { SimpleCoinInfo } from '../../move/ext/move-dex.js'
import { AptosNetwork, getClient } from '../network.js'
import { _0x1 } from '@sentio/sdk/aptos/builtin'
import { coin } from '@sentio/sdk/aptos/builtin/0x1'
import { MoveStructId } from '@aptos-labs/ts-sdk'
import { AptosChainId } from '@sentio/chain'

Expand Down Expand Up @@ -87,7 +87,7 @@ export async function getCoinInfoWithFallback(type: string, network?: AptosNetwo
const client = getClient(network)
// client.getDigitalAssetData()
const account = type.split(SPLITTER)[0]
const coinInfo = _0x1.coin.CoinInfo.type(parseMoveType(type)).getSignature() as MoveStructId
const coinInfo = coin.CoinInfo.type(parseMoveType(type)).getSignature() as MoveStructId
promise = client.getAccountResource({ accountAddress: account, resourceType: coinInfo })
COIN_METADATA_CACHE.set(key, promise)
}
Expand Down

0 comments on commit 2d6a383

Please sign in to comment.