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
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"protobufjs": "6.10.2"
},
"devDependencies": {
"@elrondnetwork/erdjs-network-providers": "0.1.1",
"@elrondnetwork/erdjs-network-providers": "0.1.2",
"@elrondnetwork/erdjs-walletcore": "1.0.0",
"@types/assert": "1.4.6",
"@types/chai": "4.2.11",
Expand Down
4 changes: 2 additions & 2 deletions src/interfaceOfNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export interface INetworkConfig {
}

export interface ITransactionOnNetwork {
isCompleted: boolean;

hash: IHash;
type: string;
value: ITransactionValue;
Expand All @@ -23,8 +25,6 @@ export interface ITransactionOnNetwork {
receipt: ITransactionReceipt;
contractResults: IContractResults;
logs: ITransactionLogs;

isCompleted(): boolean;
}

export interface ITransactionStatus {
Expand Down
4 changes: 2 additions & 2 deletions src/testutils/mockProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class MockProvider {
let response = new TransactionOnNetwork({
status: new TransactionStatus("executed"),
contractResults: new ContractResults([contractResult]),
isCompleted: () => true
isCompleted: true
});

this.getTransactionResponders.unshift(new GetTransactionResponder(predicate, response));
Expand Down Expand Up @@ -105,7 +105,7 @@ export class MockProvider {
});
} else if (point instanceof MarkCompleted) {
this.mockUpdateTransaction(hash, (transaction) => {
transaction.isCompleted = () => true;
transaction.isCompleted = true;
});
} else if (point instanceof Wait) {
await timeline.start(point.milliseconds);
Expand Down
2 changes: 1 addition & 1 deletion src/transactionWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class TransactionWatcher {
* Waits until the transaction is completely processed.
*/
public async awaitCompleted(transaction: ITransaction): Promise<ITransactionOnNetwork> {
let isCompleted = (transactionOnNetwork: ITransactionOnNetwork) => transactionOnNetwork.isCompleted();
let isCompleted = (transactionOnNetwork: ITransactionOnNetwork) => transactionOnNetwork.isCompleted;
let doFetch = async () => await this.fetcher.getTransaction(transaction.getHash(), undefined, true);
let errorProvider = () => new ErrExpectedTransactionStatusNotReached();

Expand Down