Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Send/__tests__/SendToken.test.js
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | window.matchMedia = query => ({ | ||||
removeEventListener: jest.fn(), | removeEventListener: jest.fn(), | ||||
dispatchEvent: jest.fn(), | dispatchEvent: jest.fn(), | ||||
}); | }); | ||||
const SEND_TOKEN_TOKENID = | const SEND_TOKEN_TOKENID = | ||||
'3fee3384150b030490b7bee095a63900f66a45f2d8e3002ae2cf17ce3ef4d109'; | '3fee3384150b030490b7bee095a63900f66a45f2d8e3002ae2cf17ce3ef4d109'; | ||||
const SEND_TOKEN_DECIMALS = 0; | const SEND_TOKEN_DECIMALS = 0; | ||||
const SEND_TOKEN_TICKER = 'BEAR'; | const SEND_TOKEN_TICKER = 'BEAR'; | ||||
const SEND_TOKEN_BALANCE = walletWithXecAndTokens.state.tokens[0].balance; | const SEND_TOKEN_BALANCE = | ||||
walletWithXecAndTokens.state.tokens.get(SEND_TOKEN_TOKENID); | |||||
// See src/validation, ref parseAddressInput | // See src/validation, ref parseAddressInput | ||||
// See SendToken for some modified errors (SendToken does not support bip21) | // See SendToken for some modified errors (SendToken does not support bip21) | ||||
// These could change, which would break tests, which is expected behavior if we haven't | // These could change, which would break tests, which is expected behavior if we haven't | ||||
// updated tests properly on changing the app | // updated tests properly on changing the app | ||||
const SEND_ADDRESS_VALIDATION_ERRORS_TOKEN = [ | const SEND_ADDRESS_VALIDATION_ERRORS_TOKEN = [ | ||||
`Aliases must end with '.xec'`, | `Aliases must end with '.xec'`, | ||||
'eCash Alias does not exist or yet to receive 1 confirmation', | 'eCash Alias does not exist or yet to receive 1 confirmation', | ||||
▲ Show 20 Lines • Show All 457 Lines • Show Last 20 Lines |