Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ TON_COIN_TRANSFER_TEST_IS_ACTIVE=false
TON_TOKEN_TRANSFER_TEST_IS_ACTIVE=false
TON_TOKEN_APPROVE_TEST_IS_ACTIVE=false
TON_TOKEN_TRANSFER_FROM_TEST_IS_ACTIVE=false
TON_NFT_TRANSACTION_TEST_IS_ACTIVE=true
TON_NFT_TRANSACTION_TEST_IS_ACTIVE=false
TON_TRANSACTION_LISTENER_TEST_IS_ACTIVE=false

TON_COIN_BALANCE_TEST_AMOUNT=0.199996009
Expand Down
2 changes: 1 addition & 1 deletion packages/networks/bitcoin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/bitcoin",
"version": "0.4.15",
"version": "0.4.18",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/networks/evm-chains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/evm-chains",
"version": "0.4.15",
"version": "0.4.18",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/networks/solana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/solana",
"version": "0.4.16",
"version": "0.4.18",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
9 changes: 6 additions & 3 deletions packages/networks/solana/src/models/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ export class Transaction implements TransactionInterface<ParsedTransactionWithMe
return TransactionStatusEnum.PENDING
}

return data.meta?.err !== null
? TransactionStatusEnum.FAILED
: TransactionStatusEnum.CONFIRMED
if (data.meta?.err !== null) {
console.error('MC Solana TX getStatus', data.meta?.err)
return TransactionStatusEnum.FAILED
} else {
return TransactionStatusEnum.CONFIRMED
}
}
}
2 changes: 1 addition & 1 deletion packages/networks/ton/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/ton",
"version": "0.1.10",
"version": "0.1.11",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
10 changes: 9 additions & 1 deletion packages/networks/ton/tests/assets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const nftTransactionTestIsActive = Boolean(

const balanceTestAddress = String(process.env.TON_BALANCE_TEST_ADDRESS)
const senderPrivateKey = String(process.env.TON_SENDER_SEED_PHRASE)
// const receiverPrivateKey = String(process.env.TON_RECEIVER_SEED_PHRASE)
const receiverPrivateKey = String(process.env.TON_RECEIVER_SEED_PHRASE)
const senderTestAddress = String(process.env.TON_SENDER_ADDRESS)
const receiverTestAddress = String(process.env.TON_RECEIVER_ADDRESS)
const tokenTestAddress = String(process.env.TON_TOKEN_TEST_ADDRESS)
Expand Down Expand Up @@ -226,6 +226,14 @@ describe('Nft', () => {
await checkTx(await signer.send())

expect(await nft.getOwner(nftTransferId)).toBe(receiverTestAddress)

const signer2 = await nft.transfer(receiverTestAddress, senderTestAddress, nftTransferId)

await checkSigner(signer2, receiverPrivateKey)

await waitForSec(5)

await checkTx(await signer2.send())
})

// it('Approve', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/networks/tron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/tron",
"version": "0.4.16",
"version": "0.4.18",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/networks/xrpl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/xrpl",
"version": "0.1.0",
"version": "0.1.2",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/networks/xrpl/src/services/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Client {
return result.info.validated_ledger.reserve_base_xrp
}

async getAccountInfo(address: string): Promise<AccountInfoResponse | ErrorResponse> {
async getAccountInfo(address: string): Promise<AccountInfoResponse> {
return await this.request('account_info', {
account: address,
ledger_index: 'validated'
Expand All @@ -48,13 +48,13 @@ export default class Client {
}

async getBalance(address: string): Promise<string> {
const response = await this.getAccountInfo(address)
const { result } = await this.getAccountInfo(address)

if (this.isError(response)) {
if (this.isError(result)) {
return '0'
}

return response.result.account_data.Balance
return result.account_data.Balance
}

async getLedger(): Promise<LedgerResponse> {
Expand Down