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 e2e/infrastructure/BlockHttp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('BlockHttp', () => {
const signedTransaction = transferTransaction.signWith(account, generationHash);
helper.announce(signedTransaction).then((transaction) => {
chainHeight = transaction.transactionInfo!.height.toString();
return transaction;
done();
});
});
});
Expand Down
3 changes: 1 addition & 2 deletions e2e/infrastructure/IntegrationTestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ export class IntegrationTestHelper {
'../../../catapult-service-bootstrap/build/generated-addresses/addresses.yaml'),
(error: any, yamlData: any) => {
if (error) {
console.log(`catapult-service-bootstrap generated address could not be loaded.
Ignoring and using accounts from network.conf. Error: ${error}`);
console.log(`catapult-service-bootstrap generated address could not be loaded. Ignoring and using accounts from network.conf.`);
return resolve(this);
} else {
const parsedYaml = this.yaml.safeLoad(yamlData);
Expand Down
2 changes: 1 addition & 1 deletion e2e/infrastructure/Listener.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ describe('Listener', () => {
return helper.announce(transferTransaction.signWith(account, generationHash)).then(() => {
throw new Error('Transaction should have failed!!');
}, (error) => {
expect(error.status).to.be.equal('Failure_Core_Insufficient_Balance');
expect(error.code).to.be.equal('Failure_Core_Insufficient_Balance');
});
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/infrastructure/Listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ export class Listener implements IListener {
extractBeneficiary(message, message.block.network), // passing `message` as `blockDTO`
),
});
} else if (message.status) {
} else if (message.code) {
this.messageSubject.next({
channelName: ListenerChannelName.status, message: new TransactionStatusError(
Address.createFromEncoded(message.address),
message.hash,
message.status,
message.code,
Deadline.createFromDTO(message.deadline)),
});
} else if (message.parentHash) {
Expand Down
1 change: 0 additions & 1 deletion src/model/account/MultisigAccountGraphInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {MultisigAccountInfo} from './MultisigAccountInfo';
export class MultisigAccountGraphInfo {

/**
* @internal
* @param multisigAccounts
*/
constructor(/**
Expand Down
6 changes: 3 additions & 3 deletions src/model/transaction/TransactionStatusError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class TransactionStatusError {
* @internal
* @param address
* @param hash
* @param status
* @param code
* @param deadline
*/
constructor(
Expand All @@ -40,9 +40,9 @@ export class TransactionStatusError {
*/
public readonly hash: string,
/**
* The status error message.
* The error code.
*/
public readonly status: string,
public readonly code: string,
/**
* The transaction deadline.
*/
Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/Listener.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Listener', () => {
address: errorEncodedAddress,
deadline: '1010',
hash: 'transaction-hash',
status: 'error-message',
code: 'error-message',
};

const listener = new Listener('ws://localhost:3000', WebSocketMock);
Expand All @@ -75,7 +75,7 @@ describe('Listener', () => {
const transactionStatusError = reportedStatus[0];
expect(transactionStatusError.address).to.deep.equal(errorAddress);
expect(transactionStatusError.hash).to.be.equal(statusInfoErrorDTO.hash);
expect(transactionStatusError.status).to.be.equal(statusInfoErrorDTO.status);
expect(transactionStatusError.code).to.be.equal(statusInfoErrorDTO.code);
deepEqual(transactionStatusError.deadline.toDTO(), UInt64.fromNumericString(statusInfoErrorDTO.deadline).toDTO());

});
Expand Down
6 changes: 3 additions & 3 deletions test/model/transaction/TransactionStatusError.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ describe('TransactionStatusError', () => {
address: Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'),
deadline: '1010',
hash: 'transaction-hash',
status: 'error-message',
code: 'error-message',
};
const transactionStatusError = new TransactionStatusError(
statusInfoErrorDTO.address,
statusInfoErrorDTO.hash,
statusInfoErrorDTO.status,
statusInfoErrorDTO.code,
Deadline.createFromDTO(statusInfoErrorDTO.deadline));

expect(transactionStatusError.address).to.be.equal(statusInfoErrorDTO.address);
expect(transactionStatusError.hash).to.be.equal(statusInfoErrorDTO.hash);
expect(transactionStatusError.status).to.be.equal(statusInfoErrorDTO.status);
expect(transactionStatusError.code).to.be.equal(statusInfoErrorDTO.code);
deepEqual(transactionStatusError.deadline.toDTO(), UInt64.fromNumericString(statusInfoErrorDTO.deadline).toDTO());
});
});