@cryptorubic/web3 1.1.0-alpha-stellar.38 → 1.1.0-alpha-stellar.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ const core_1 = require("@cryptorubic/core");
|
|
|
5
5
|
const abstract_adapter_signer_1 = require("../../common/signer/abstract-adapter-signer");
|
|
6
6
|
const stellar_sdk_1 = require("@stellar/stellar-sdk");
|
|
7
7
|
const bignumber_js_1 = require("bignumber.js");
|
|
8
|
-
const insufficient_funds_gas_price_value_error_1 = require("
|
|
8
|
+
const insufficient_funds_gas_price_value_error_1 = require("../../../../errors/cross-chain/insufficient-funds-gas-price-value.error");
|
|
9
9
|
class StellarAdapterSigner extends abstract_adapter_signer_1.AbstractAdapterSigner {
|
|
10
10
|
get publicClient() {
|
|
11
11
|
if (!this.publicRef.public) {
|
|
@@ -3,6 +3,7 @@ import { AbstractAdapter } from '../common/abstract-adapter';
|
|
|
3
3
|
import { StellarClient } from './models/stellar-client';
|
|
4
4
|
import { StellarWallet } from './models/stellar-wallet';
|
|
5
5
|
import { TxStatus } from '../models/web3-public-models/tx-status';
|
|
6
|
+
import { Horizon } from '@stellar/stellar-sdk';
|
|
6
7
|
import { ClientAdaptersFactoryParams } from '../../models/create-factory-params';
|
|
7
8
|
import { StellarAdapterSigner } from './signer/stellar-adapter-signer';
|
|
8
9
|
import BigNumber from 'bignumber.js';
|
|
@@ -15,7 +16,7 @@ import { StellarRpcProvider } from './models/stellar-rpc-provider';
|
|
|
15
16
|
export declare class StellarAdapter extends AbstractAdapter<StellarClient, StellarWallet, StellarBlockchainName> {
|
|
16
17
|
private readonly rpc;
|
|
17
18
|
readonly signer: StellarAdapterSigner;
|
|
18
|
-
|
|
19
|
+
readonly horizonClient: Horizon.Server;
|
|
19
20
|
private readonly CLASSIC_TOKEN_DECIMALS;
|
|
20
21
|
constructor(rpc: StellarRpcProvider[], httpClient: HttpClient, logger?: ICustomLogger, clientParams?: ClientAdaptersFactoryParams);
|
|
21
22
|
initWeb3Client(): void;
|
|
@@ -121,7 +121,7 @@ class StellarAdapter extends abstract_adapter_1.AbstractAdapter {
|
|
|
121
121
|
const { hash } = await this.public.sendTransaction(stellar_sdk_1.TransactionBuilder.fromXDR(signedTxXdr, stellar_sdk_1.Networks.PUBLIC));
|
|
122
122
|
const resp = await this.public.pollTransaction(hash);
|
|
123
123
|
if (resp.status === 'FAILED') {
|
|
124
|
-
throw new Error('Failed to execute transaction', { cause: resp.resultXdr });
|
|
124
|
+
throw new Error('Failed to execute transaction', { cause: resp.resultXdr.result() });
|
|
125
125
|
}
|
|
126
126
|
return resp.txHash;
|
|
127
127
|
}
|