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
12 changes: 6 additions & 6 deletions wallet/common/nem/src/modules/TransferModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ export class TransferModule {

if (transaction.type !== TransactionType.TRANSFER) {
throw new ControllerError(
'error_failed_decrypt_message_invalid_transaction_type',
`Failed to decrypt message. Transaction type "${transaction.type}" is not supported. `
+ `Expected type "${TransactionType.TRANSFER}"`
+ `Expected type "${TransactionType.TRANSFER}"`,
'error_failed_decrypt_message_invalid_transaction_type'
);
}

Expand All @@ -173,8 +173,8 @@ export class TransferModule {
}

throw new ControllerError(
'error_failed_decrypt_message_not_related',
'Failed to decrypt message. Transaction is not related to the current account'
'Failed to decrypt message. Transaction is not related to the current account',
'error_failed_decrypt_message_not_related'
);
};

Expand All @@ -183,8 +183,8 @@ export class TransferModule {
const accountInfo = await this.#api.account.fetchAccountInfo(networkProperties, recipientAddress);
if (!accountInfo.publicKey) {
throw new ControllerError(
'error_transfer_encrypted_message_no_recipient_public_key',
`Cannot encrypt message: recipient public key for "${recipientAddress}" is unknown`
`Cannot encrypt message: recipient public key for "${recipientAddress}" is unknown`,
'error_transfer_encrypted_message_no_recipient_public_key'
);
}
return accountInfo.publicKey;
Expand Down
12 changes: 6 additions & 6 deletions wallet/common/nem/tests/modules/TransferModule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ describe('modules/TransferModule', () => {
},
expected: {
error: new ControllerError(
'error_transfer_encrypted_message_no_recipient_public_key',
`Cannot encrypt message: recipient public key for "${RECIPIENT_ADDRESS}" is unknown`
`Cannot encrypt message: recipient public key for "${RECIPIENT_ADDRESS}" is unknown`,
'error_transfer_encrypted_message_no_recipient_public_key'
),
shouldFetchRecipientInfo: true
}
Expand Down Expand Up @@ -369,9 +369,9 @@ describe('modules/TransferModule', () => {
},
expected: {
error: new ControllerError(
'error_failed_decrypt_message_invalid_transaction_type',
`Failed to decrypt message. Transaction type "${TransactionType.MULTISIG}" is not supported. `
+ `Expected type "${TransactionType.TRANSFER}"`
+ `Expected type "${TransactionType.TRANSFER}"`,
'error_failed_decrypt_message_invalid_transaction_type'
)
}
},
Expand All @@ -388,8 +388,8 @@ describe('modules/TransferModule', () => {
},
expected: {
error: new ControllerError(
'error_failed_decrypt_message_not_related',
'Failed to decrypt message. Transaction is not related to the current account'
'Failed to decrypt message. Transaction is not related to the current account',
'error_failed_decrypt_message_not_related'
)
}
}
Expand Down
8 changes: 4 additions & 4 deletions wallet/common/symbol/src/modules/HarvestingModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ export class HarvestingModule {
// If nothing to unlink, then just escape
if (transactions.length === 0) {
throw new ControllerError(
'error_harvesting_no_keys_to_unlink',
'Failed to create stop harvesting transaction. No keys to unlink.'
'Failed to create stop harvesting transaction. No keys to unlink.',
'error_harvesting_no_keys_to_unlink'
);
}

Expand Down Expand Up @@ -418,8 +418,8 @@ export class HarvestingModule {

if (!accountInfo.publicKey) {
throw new ControllerError(
'error_harvesting_account_no_activity',
`Failed to create harvesting transaction. Public key for account "${address}" does not exist on the network.`
`Failed to create harvesting transaction. Public key for account "${address}" does not exist on the network.`,
'error_harvesting_account_no_activity'
);
}

Expand Down
12 changes: 6 additions & 6 deletions wallet/common/symbol/src/modules/TransferModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class TransferModule {

if (!recipientAddress) {
throw new ControllerError(
'error_transfer_unknown_recipient',
`Failed to create transfer transaction. Recipient address not found for provided alias "${recipientAddressOrAlias}"`
`Failed to create transfer transaction. Recipient address not found for provided alias "${recipientAddressOrAlias}"`,
'error_transfer_unknown_recipient'
);
}

Expand Down Expand Up @@ -132,9 +132,9 @@ export class TransferModule {

if (transaction.type !== TransactionType.TRANSFER) {
throw new ControllerError(
'error_failed_decrypt_message_invalid_transaction_type',
`Failed to decrypt message. Transaction type "${transaction.type}" is not supported. `
+ `Expected type "${TransactionType.TRANSFER}"`
+ `Expected type "${TransactionType.TRANSFER}"`,
'error_failed_decrypt_message_invalid_transaction_type'
);
}

Expand All @@ -153,8 +153,8 @@ export class TransferModule {
}

throw new ControllerError(
'error_failed_decrypt_message_not_related',
'Failed to decrypt message. Transaction is not related to current account'
'Failed to decrypt message. Transaction is not related to current account',
'error_failed_decrypt_message_not_related'
);
};

Expand Down
12 changes: 6 additions & 6 deletions wallet/common/symbol/tests/modules/HarvestingModule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ describe('HarvestingModule', () => {
config: { harvester: harvester.currentAccountWithoutLinkedKeys },
expected: {
error: new ControllerError(
'error_harvesting_no_keys_to_unlink',
'Failed to create stop harvesting transaction. No keys to unlink.'
'Failed to create stop harvesting transaction. No keys to unlink.',
'error_harvesting_no_keys_to_unlink'
)
}
},
Expand All @@ -614,9 +614,9 @@ describe('HarvestingModule', () => {
config: { harvester: harvester.inactiveMultisigAccount },
expected: {
error: new ControllerError(
'error_harvesting_account_no_activity',
'Failed to create harvesting transaction. Public key for account '
+ `"${inactiveMultisigAccountInfo.address}" does not exist on the network.`
+ `"${inactiveMultisigAccountInfo.address}" does not exist on the network.`,
'error_harvesting_account_no_activity'
)
}
}
Expand Down Expand Up @@ -719,9 +719,9 @@ describe('HarvestingModule', () => {
it('throws when the multisig harvester has never been active on the network', async () => {
// Arrange:
const expectedError = new ControllerError(
'error_harvesting_account_no_activity',
'Failed to create harvesting transaction. Public key for account '
+ `"${inactiveMultisigAccountInfo.address}" does not exist on the network.`
+ `"${inactiveMultisigAccountInfo.address}" does not exist on the network.`,
'error_harvesting_account_no_activity'
);
api.account.fetchAccountInfo.mockResolvedValue(inactiveMultisigAccountInfo);

Expand Down
12 changes: 6 additions & 6 deletions wallet/common/symbol/tests/modules/TransferModule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ describe('TransferModule', () => {
isMessageEncrypted: false
};
const expectedError = new ControllerError(
'error_transfer_unknown_recipient',
`Failed to create transfer transaction. Recipient address not found for provided alias "${aliasName}"`
`Failed to create transfer transaction. Recipient address not found for provided alias "${aliasName}"`,
'error_transfer_unknown_recipient'
);

// Act & Assert:
Expand Down Expand Up @@ -601,9 +601,9 @@ describe('TransferModule', () => {
signerPublicKey: currentAccount.publicKey
};
const expectedError = new ControllerError(
'error_failed_decrypt_message_invalid_transaction_type',
// eslint-disable-next-line max-len
`Failed to decrypt message. Transaction type "${transaction.type}" is not supported. Expected type "${TransactionType.TRANSFER}"`
`Failed to decrypt message. Transaction type "${transaction.type}" is not supported. Expected type "${TransactionType.TRANSFER}"`,
'error_failed_decrypt_message_invalid_transaction_type'
);

// Act & Assert:
Expand All @@ -628,8 +628,8 @@ describe('TransferModule', () => {
deadline: createDeadline(2, networkProperties.epochAdjustment)
};
const expectedError = new ControllerError(
'error_failed_decrypt_message_not_related',
'Failed to decrypt message. Transaction is not related to current account'
'Failed to decrypt message. Transaction is not related to current account',
'error_failed_decrypt_message_not_related'
);

// Act & Assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ describe('components/NavigationMenu', () => {
runScreenNavigationTest(NavigationMenu, {
navigationActions: [
{
buttonText: 'navigation_home',
buttonText: 'component_navigationMenu_tab_home',
actionName: 'goToHome'
},
{
buttonText: 'navigation_history',
buttonText: 'component_navigationMenu_tab_history',
actionName: 'goToHistory'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { fireEvent, render } from '@testing-library/react-native';

const SCREEN_TEXT = {
textTitle: 'Transaction Fee',
textFeeSlow: 'selector_fee_slow',
textFeeMedium: 'selector_fee_medium',
textFeeFast: 'selector_fee_fast'
textFeeSlow: 'feeSpeed_slow',
textFeeMedium: 'feeSpeed_medium',
textFeeFast: 'feeSpeed_fast'
};

const FeeTierLevel = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { mockLocalization } from '__tests__/mock-helpers';
import { fireEvent, render, waitFor } from '@testing-library/react-native';

const SCREEN_TEXT = {
inputAmountLabel: 'input_amount',
inputAmountLabel: 'inputLabel_amount',
inputAmountPlaceholder: '0',
textAvailableBalance: 'c_inputAmount_label_available',
textConfirmTitle: 'c_inputAmount_confirm_title',
textAvailableBalance: 'component_inputAmount_label_available',
textConfirmTitle: 'component_inputAmount_dialog_maxAmount_title',
buttonConfirm: 'button_confirm',
buttonCancel: 'button_cancel'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const TICKER = 'XYM';
// Screen Text

const SCREEN_TEXT = {
label: 'input_sender',
tabCurrentAccount: 'c_selectTransactionSender_currentAccount',
tabMultisigAccount: 'c_selectTransactionSender_multisigAccount',
dropdownTitle: 'c_selectTransactionSender_selectTitle',
defaultMultisigName: 's_multisig_defaultAccountName'
label: 'Sender', // passed in as a prop, the caller translates it
tabCurrentAccount: 'component_selectTransactionSender_tab_currentAccount',
tabMultisigAccount: 'component_selectTransactionSender_tab_multisigAccount',
dropdownTitle: 'component_selectTransactionSender_title_selectSender',
defaultMultisigName: 'component_selectTransactionSender_title_defaultAccountName'
};

// Account Fixtures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const token = TokenFixtureBuilder
const TICKER = 'XYM';
const DISPLAY_NAME = `${token.name} • ${TICKER}`;
const ACCESSIBILITY_LABEL = 'token-item';
const EXPIRED_TEXT = 's_assets_item_expired';
const EXPIRED_TEXT = 'component_expirationProgress_label_expired';

const expiredTokenExpiration = {
startHeight: 1_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ const TEST_PASSCODE = '1234';
const INCORRECT_PASSCODE = '0000';

const SCREEN_TEXT = {
textCreateEnterTitle: 's_passcode_createEnter_title',
textCreateConfirmTitle: 's_passcode_createConfirm_title',
textVerifyTitle: 's_passcode_verify_title',
textCreateEnterDescription: 's_passcode_createEnter_description',
textCreateConfirmDescription: 's_passcode_createConfirm_description',
textErrorIncorrect: 's_passcode_error_incorrect',
textErrorMismatch: 's_passcode_error_mismatch',
textErrorMaxAttempts: 's_passcode_error_maxAttempts_time_minute',
textCreateEnterTitle: 'component_passcode_title_createEnter',
textCreateConfirmTitle: 'component_passcode_title_createConfirm',
textVerifyTitle: 'component_passcode_title_verify',
textCreateEnterDescription: 'component_passcode_description_createEnter',
textCreateConfirmDescription: 'component_passcode_description_createConfirm',
textErrorIncorrect: 'component_passcode_errorMessage_incorrect',
textErrorMismatch: 'component_passcode_errorMessage_mismatch',
textErrorMaxAttempts: 'component_passcode_errorMessage_maxAttemptsMinute',
buttonCancel: 'button_cancel',
buttonDelete: 'delete'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Active', 'data_true']
visibleTexts: ['Active', 'fieldValue_true']
}
},
{
Expand All @@ -183,7 +183,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Active', 'data_false']
visibleTexts: ['Active', 'fieldValue_false']
}
},
{
Expand All @@ -196,7 +196,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Message', 'data_encrypted']
visibleTexts: ['Message', 'fieldValue_encrypted']
}
},
{
Expand All @@ -209,7 +209,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Message', 'data_unencrypted']
visibleTexts: ['Message', 'fieldValue_unencrypted']
}
},
{
Expand All @@ -222,7 +222,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Status', 'data_pending']
visibleTexts: ['Status', 'fieldValue_pending']
}
},
{
Expand All @@ -236,7 +236,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Type', 'transactionDescriptor_symbol_16724']
visibleTexts: ['Type', 'transactionType_transfer']
}
},
{
Expand All @@ -250,7 +250,7 @@ describe('components/TableView', () => {
}
},
expected: {
visibleTexts: ['Type', 'transactionDescriptor_ethereum_1']
visibleTexts: ['Type', 'transactionType_transfer']
}
}
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const NETWORK_IDENTIFIER = 'testnet';
// Screen Text

const SCREEN_TEXT = {
textWarningTitle: 'warning_multisig_title',
textWarningBody: 'warning_multisig_body',
textWarningTitle: 'alert_multisigWarning_title',
textWarningBody: 'alert_multisigWarning_description',
textFieldCosignatories: 'fieldTitle_cosignatories'
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const SCREEN_TEXT = {
buttonConfirm: 'button_confirm',
buttonCancel: 'button_cancel',
// Dialog
textConfirmDialogTitle: 'form_transfer_confirm_title',
textConfirmDialogTitle: 'component_transactionConfirmationDialog_title_confirmTransfer',
textCustomConfirmTitle: 'Custom Confirm Title',
textCustomConfirmText: 'Custom confirm text message',
// Multisig warning
textMultisigWarningTitle: 'warning_multisig_title',
textMultisigWarningBody: 'warning_multisig_body',
textMultisigWarningTitle: 'alert_multisigWarning_title',
textMultisigWarningBody: 'alert_multisigWarning_description',
// Children content
textChildrenContent: 'Test Form Content'
};
Expand Down
Loading
Loading