From 864805b4465ec46e6af01271a9c9138896758424 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Thu, 14 Dec 2023 12:26:20 +0100 Subject: [PATCH 001/216] chore: bump build number --- android/build.gradle | 2 +- ios/Xaman.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c996f3833..6441d8d94 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -56,7 +56,7 @@ subprojects { subproject -> versionMajor = npmVersion[0] versionMinor = npmVersion[1] versionPatch = npmVersion[2] - buildNumber = 16 + buildNumber = 18 } } diff --git a/ios/Xaman.xcodeproj/project.pbxproj b/ios/Xaman.xcodeproj/project.pbxproj index 61b3cb0bd..b0e6f8e13 100644 --- a/ios/Xaman.xcodeproj/project.pbxproj +++ b/ios/Xaman.xcodeproj/project.pbxproj @@ -1106,7 +1106,7 @@ CODE_SIGN_ENTITLEMENTS = Xaman/Xaman.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = LK5BBJNJZ6; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; @@ -1142,7 +1142,7 @@ CODE_SIGN_ENTITLEMENTS = Xaman/Xaman.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = LK5BBJNJZ6; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = Xaman/Info.plist; From b4e2d0d64910533079af7dc07c7d1b20e0a2708a Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Thu, 14 Dec 2023 12:28:30 +0100 Subject: [PATCH 002/216] fix: storage populate method and unit tests --- .../__tests__/integration/populate.test.ts | 98 ++++++++++++++++++ .../__tests__/integration/storage.test.ts | 2 +- .../__tests__/repositories/network.test.ts | 2 +- src/store/models/schemas/latest.ts | 2 - src/store/models/schemas/populate.ts | 99 +++++++++++++++++++ src/store/models/schemas/v14/core.ts | 12 --- src/store/models/schemas/v14/index.ts | 7 -- src/store/models/schemas/v14/network.ts | 19 +--- src/store/models/schemas/v14/node.ts | 18 ++-- src/store/models/schemas/v15/index.ts | 8 -- src/store/models/schemas/v15/network.ts | 28 ------ src/store/storage.ts | 7 +- 12 files changed, 213 insertions(+), 89 deletions(-) create mode 100644 src/store/__tests__/integration/populate.test.ts create mode 100644 src/store/models/schemas/populate.ts diff --git a/src/store/__tests__/integration/populate.test.ts b/src/store/__tests__/integration/populate.test.ts new file mode 100644 index 000000000..9a9971670 --- /dev/null +++ b/src/store/__tests__/integration/populate.test.ts @@ -0,0 +1,98 @@ +import { values } from 'lodash'; + +import Realm from 'realm'; + +// eslint-disable-next-line import/no-unresolved +import NetworkConfig from '@constants/network'; + +import * as models from '../../models'; + +import { populateDataStore, populateCore, populateNetworks, populateNodes } from '../../models/schemas/populate'; + +describe('Populate', () => { + let instance: Realm; + + beforeAll(async () => { + // get realm instance + instance = new Realm({ schema: values(models), path: './.jest/realmInMemory', inMemory: true }); + }); + + it('should be able to populate networks', () => { + jest.spyOn(instance, 'create'); + + // call the populateNetworks + instance.write(() => { + populateNetworks(instance); + }); + + expect(instance.create).toBeCalledTimes(NetworkConfig.networks.length); + expect(instance.create).toBeCalledWith(models.NetworkModel.schema.name, expect.any(Object)); + }); + + it('should be able to populate nodes', () => { + jest.spyOn(instance, 'create'); + + // call the populateNodes + instance.write(() => { + populateNodes(instance); + }); + + expect(instance.create).toBeCalledWith(models.NodeModel.schema.name, expect.any(Object)); + + // should be able to assign created nodes to the networks nodes and default nodes + const networks = instance.objects(models.NetworkModel.schema.name); + + // verify we already have network objects + expect(networks.length).toBeGreaterThan(0); + + for (const network of networks) { + expect(network.nodes.length).toBeGreaterThan(0); + expect(network.defaultNode).toBeDefined(); + expect(network.defaultNode).toBeInstanceOf(models.NodeModel); + } + }); + + it('should be able to populate core', () => { + jest.spyOn(instance, 'create'); + + // call the populateCore + instance.write(() => { + populateCore(instance); + }); + + expect(instance.create).toBeCalledWith(models.CoreModel.schema.name, expect.any(Object)); + + const coreObject = instance.objects(models.CoreModel.schema.name)[0]; + + // make sure the core object is created + expect(coreObject).toBeDefined(); + + // verify coreObject network has been defined and also default network from NetworkConfig has been set + expect(coreObject.network).toBeDefined(); + expect(coreObject.network).toBeInstanceOf(models.NetworkModel); + expect(coreObject.network.networkId).toBe(NetworkConfig.defaultNetworkId); + }); + + it('should call functions in correct order', () => { + const populateNetworksMock = jest.spyOn(require('../../models/schemas/populate'), 'populateNetworks'); + const populateNodesMock = jest.spyOn(require('../../models/schemas/populate'), 'populateNodes'); + const populateCoreMock = jest.spyOn(require('../../models/schemas/populate'), 'populateCore'); + + // call populateDataStore + populateDataStore(instance); + + expect( + populateNetworksMock.mock.invocationCallOrder[0] <= populateNodesMock.mock.invocationCallOrder[0] && + populateNodesMock.mock.invocationCallOrder[0] <= populateCoreMock.mock.invocationCallOrder[0], + ).toBe(true); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + afterAll(() => { + instance.close(); + Realm.deleteFile({ path: './.jest/realmInMemory' }); + }); +}); diff --git a/src/store/__tests__/integration/storage.test.ts b/src/store/__tests__/integration/storage.test.ts index f717197c6..4e1e20da5 100644 --- a/src/store/__tests__/integration/storage.test.ts +++ b/src/store/__tests__/integration/storage.test.ts @@ -13,7 +13,7 @@ describe('Storage', () => { const sorted = sortBy(require('../../models/schemas').default, [(v) => v.schemaVersion]); const latest = sorted.slice(-1)[0]; - const populateSpy = jest.spyOn(latest, 'populate'); + const populateSpy = jest.spyOn(require('../../models/schemas/populate'), 'populateDataStore'); // initialize the storage await storage.initialize(); diff --git a/src/store/__tests__/repositories/network.test.ts b/src/store/__tests__/repositories/network.test.ts index 15fd3f29e..94a4f368a 100644 --- a/src/store/__tests__/repositories/network.test.ts +++ b/src/store/__tests__/repositories/network.test.ts @@ -5,7 +5,7 @@ import { values } from 'lodash'; import NetworksConfig from '@constants/network'; import * as models from '../../models'; -import { populate as populateDataStore } from '../../models/schemas/latest'; +import { populateDataStore } from '../../models/schemas/populate'; import { NetworkRepository } from '../../repositories'; import { NetworkRailsChangesType, NetworkType } from '../../types'; diff --git a/src/store/models/schemas/latest.ts b/src/store/models/schemas/latest.ts index d5296ee25..182694d7d 100644 --- a/src/store/models/schemas/latest.ts +++ b/src/store/models/schemas/latest.ts @@ -1,7 +1,5 @@ import { schemas } from './v15'; -export { migration, populate } from './v15'; - export const { CoreSchema, AccountSchema, diff --git a/src/store/models/schemas/populate.ts b/src/store/models/schemas/populate.ts new file mode 100644 index 000000000..fa606c4fd --- /dev/null +++ b/src/store/models/schemas/populate.ts @@ -0,0 +1,99 @@ +import Realm from 'realm'; + +import { NetworkModel, NodeModel } from '@store/models/objects'; + +import { NetworkConfig } from '@common/constants'; + +/** + * Populates networks + * + * @param {Realm} realm - The realm to populate networks into. + * @returns {void} + */ +export const populateNetworks = (realm: Realm): void => { + // default supported networks list + const { networks } = NetworkConfig; + + // create networks + for (let i = 0; i < networks.length; i++) { + realm.create(NetworkModel.schema.name, { + id: new Realm.BSON.ObjectId(), + key: networks[i].key, + networkId: networks[i].networkId, + name: networks[i].name, + nativeAsset: networks[i].nativeAsset, + color: networks[i].color, + type: networks[i].type, + baseReserve: NetworkConfig.baseReserve, + ownerReserve: NetworkConfig.ownerReserve, + amendments: [], + definitionsString: '', + registerAt: new Date(), + updatedAt: new Date(), + }); + } +}; + +/** + * Populates nodes + * + * @param {Realm} realm - The Realm instance to populate nodes for. + * @returns {void} + */ +export const populateNodes = (realm: Realm): void => { + const networks = realm.objects(NetworkModel.schema.name); + + for (let i = 0; i < networks.length; i++) { + const network = networks[i]; + const networkConfig = NetworkConfig.networks.find((net) => net.key === network.key); + const createdNodes: NodeModel[] = []; + + for (let y = 0; y < networkConfig.nodes.length; y++) { + createdNodes.push( + realm.create(NodeModel.schema.name, { + id: new Realm.BSON.ObjectId(), + endpoint: networkConfig.nodes[y], + registerAt: new Date(), + updatedAt: new Date(), + }), + ); + } + + // set the created nodes to the network + // @ts-ignore + network.nodes = createdNodes; + // eslint-disable-next-line prefer-destructuring + network.defaultNode = createdNodes[0]; + } +}; + +/** + * Populates the Core object + * + * @param {Realm} realm - The Realm object to populate. + * @returns {void} + */ +export const populateCore = (realm: Realm): void => { + // get all networks + const networks = realm.objects(NetworkModel.schema.name); + + const { defaultNetworkId } = NetworkConfig; + const selectedNetwork = networks.find((network) => network.networkId === defaultNetworkId); + + realm.create('Core', { + network: selectedNetwork, + }); +}; + +/** + * Populates the given realm with networks, nodes, and core. + * + * @param {Realm} realm - The Realm instance to populate. + */ +export const populateDataStore = (realm: Realm) => { + [populateNetworks, populateNodes, populateCore].forEach((fn) => { + realm.write(() => { + fn(realm); + }); + }); +}; diff --git a/src/store/models/schemas/v14/core.ts b/src/store/models/schemas/v14/core.ts index 82aff7253..6be21503d 100644 --- a/src/store/models/schemas/v14/core.ts +++ b/src/store/models/schemas/v14/core.ts @@ -71,18 +71,6 @@ const CoreSchema = { } } }, - - populate: (realm: Realm) => { - // get all networks - const networks = realm.objects('Network') as any; - - const { defaultNetworkId } = NetworkConfig; - const selectedNetwork = networks.find((n: any) => n.id === defaultNetworkId); - - realm.create('Core', { - network: selectedNetwork, - }); - }, }; export default CoreSchema; diff --git a/src/store/models/schemas/v14/index.ts b/src/store/models/schemas/v14/index.ts index 6b35ac362..1401c3a93 100644 --- a/src/store/models/schemas/v14/index.ts +++ b/src/store/models/schemas/v14/index.ts @@ -23,13 +23,6 @@ export const migration = (oldRealm: Realm, newRealm: Realm) => { AccountSchema.migration(oldRealm, newRealm); TrustLineSchema.migration(oldRealm, newRealm); }; -export const populate = (realm: Realm) => { - [NetworkSchema, NodeSchema, CoreSchema].forEach((schema) => { - realm.write(() => { - schema.populate(realm); - }); - }); -}; export const schemas = { ContactSchema, CounterPartySchema, diff --git a/src/store/models/schemas/v14/network.ts b/src/store/models/schemas/v14/network.ts index 7f592a541..10c9781dd 100644 --- a/src/store/models/schemas/v14/network.ts +++ b/src/store/models/schemas/v14/network.ts @@ -30,17 +30,16 @@ const NetworkSchema = { }, }, - /* - Populate networks to the data store - Note: this is necessary in the process of migration and also fresh install - */ - populate: (realm: Realm) => { + migration: (oldRealm: Realm, newRealm: Realm) => { + /* eslint-disable-next-line */ + console.log('migrating Network schema to 14'); + // default supported networks list const { networks } = NetworkConfig; // create networks for (let i = 0; i < networks.length; i++) { - realm.create(NetworkSchema.schema.name, { + newRealm.create(NetworkSchema.schema.name, { id: networks[i].networkId, key: networks[i].key, name: networks[i].name, @@ -56,14 +55,6 @@ const NetworkSchema = { }); } }, - - migration: (oldRealm: Realm, newRealm: Realm) => { - /* eslint-disable-next-line */ - console.log('migrating Network schema to 14'); - - // populate networks - NetworkSchema.populate(newRealm); - }, }; export default NetworkSchema; diff --git a/src/store/models/schemas/v14/node.ts b/src/store/models/schemas/v14/node.ts index 374d9e682..68a3fa29f 100644 --- a/src/store/models/schemas/v14/node.ts +++ b/src/store/models/schemas/v14/node.ts @@ -21,8 +21,11 @@ const NodeSchema = { }, }, - populate: (realm: Realm) => { - const networks = realm.objects('Network') as any; + migration: (oldRealm: Realm, newRealm: Realm) => { + /* eslint-disable-next-line */ + console.log('migrating Node schema to v14'); + + const networks = newRealm.objects('Network') as any; for (let i = 0; i < networks.length; i++) { const network = networks[i]; @@ -31,8 +34,7 @@ const NodeSchema = { for (let y = 0; y < networkConfig.nodes.length; y++) { createdNodes.push( - // @ts-ignore - realm.create(NodeSchema.schema.name, { + newRealm.create(NodeSchema.schema.name, { id: new Realm.BSON.ObjectId(), endpoint: networkConfig.nodes[y], registerAt: new Date(), @@ -47,14 +49,6 @@ const NodeSchema = { network.defaultNode = createdNodes[0]; } }, - - migration: (oldRealm: Realm, newRealm: Realm) => { - /* eslint-disable-next-line */ - console.log('migrating Node schema to v14'); - - // populate nodes - NodeSchema.populate(newRealm); - }, }; export default NodeSchema; diff --git a/src/store/models/schemas/v15/index.ts b/src/store/models/schemas/v15/index.ts index 64c3a9ca6..08fbde100 100644 --- a/src/store/models/schemas/v15/index.ts +++ b/src/store/models/schemas/v15/index.ts @@ -19,16 +19,8 @@ const { /* Exports ==================================================================== */ export const schemaVersion = 15; export const migration = (oldRealm: Realm, newRealm: Realm) => { - // Note: The order is important for this schema version NetworkSchema.migration(oldRealm, newRealm); }; -export const populate = (realm: Realm) => { - [NetworkSchema, NodeSchema, CoreSchema].forEach((schema) => { - realm.write(() => { - schema.populate(realm); - }); - }); -}; export const schemas = { ContactSchema, CounterPartySchema, diff --git a/src/store/models/schemas/v15/network.ts b/src/store/models/schemas/v15/network.ts index 79af3c85d..1b912f995 100644 --- a/src/store/models/schemas/v15/network.ts +++ b/src/store/models/schemas/v15/network.ts @@ -31,34 +31,6 @@ const NetworkSchema = { }, }, - /* - Populate networks to the data store - Note: this is necessary in the process of migration and also fresh install - */ - populate: (realm: Realm) => { - // default supported networks list - const { networks } = NetworkConfig; - - // create networks - for (let i = 0; i < networks.length; i++) { - realm.create(NetworkSchema.schema.name, { - id: new Realm.BSON.ObjectId(), - key: networks[i].key, - networkId: networks[i].networkId, - name: networks[i].name, - nativeAsset: networks[i].nativeAsset, - color: networks[i].color, - type: networks[i].type, - baseReserve: NetworkConfig.baseReserve, - ownerReserve: NetworkConfig.ownerReserve, - amendments: [], - definitionsString: '', - registerAt: new Date(), - updatedAt: new Date(), - }); - } - }, - migration: (oldRealm: Realm, newRealm: Realm) => { /* eslint-disable-next-line */ console.log('migrating Network schema to 15'); diff --git a/src/store/storage.ts b/src/store/storage.ts index 292dedac6..bf1c46a3f 100644 --- a/src/store/storage.ts +++ b/src/store/storage.ts @@ -175,11 +175,10 @@ export default class Storage { return; } - const { populate } = require('./models/schemas/latest'); + const { populateDataStore } = require('./models/schemas/populate'); - if (typeof populate === 'function') { - populate(this.dataStore); - } + // populate data store + populateDataStore(this.dataStore); resolve(); } catch (error) { From 705ef4e54a1261dd13661c54879634dd8ee90986 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Tue, 19 Dec 2023 11:52:25 +0100 Subject: [PATCH 003/216] fix: crash when sending `txDetails` command from xApp --- src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx b/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx index 9c0eeb161..9866502df 100644 --- a/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx +++ b/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx @@ -408,6 +408,8 @@ class XAppBrowserModal extends Component { }; openTxDetails = async (data: { tx: string; account: string }) => { + const { network } = this.state; + const hash = get(data, 'tx', undefined); const address = get(data, 'account', undefined); @@ -427,7 +429,7 @@ class XAppBrowserModal extends Component { } setTimeout(() => { - Navigator.showModal(AppScreens.Transaction.Details, { hash, account, asModal: true }); + Navigator.showModal(AppScreens.Modal.TransactionLoader, { hash, account, network: network.key }); }, delay); }; From 9595b682851520c6d1f82940a18bde8c283e2d53 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Tue, 19 Dec 2023 11:52:59 +0100 Subject: [PATCH 004/216] fix: TransactionDetails screen header size when shown as modal --- src/components/General/Header/Header.tsx | 11 +++++++++-- src/components/General/Header/styles.ts | 4 +--- src/screens/Events/Details/DetailsView.tsx | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/General/Header/Header.tsx b/src/components/General/Header/Header.tsx index ba3bcf6be..3aeb0f835 100644 --- a/src/components/General/Header/Header.tsx +++ b/src/components/General/Header/Header.tsx @@ -126,7 +126,7 @@ const Children = ({ /* Component ==================================================================== */ class Header extends PureComponent { - static Height = AppSizes.heightPercentageToDP(9) + (Platform.OS === 'ios' ? AppSizes.statusBarHeight : 0); + static Height = AppSizes.heightPercentageToDP(9); static defaultProps = { placement: 'center', @@ -152,7 +152,14 @@ class Header extends PureComponent { this.props; return ( - + {leftComponent} diff --git a/src/components/General/Header/styles.ts b/src/components/General/Header/styles.ts index fda627c74..4867b727e 100644 --- a/src/components/General/Header/styles.ts +++ b/src/components/General/Header/styles.ts @@ -6,15 +6,13 @@ import { AppStyles, AppSizes } from '@theme'; const styles = StyleService.create({ container: { paddingHorizontal: 20, - paddingTop: Platform.OS === 'ios' ? AppSizes.statusBarHeight : 0, + marginTop: Platform.select({ ios: AppSizes.statusBarHeight, default: 0 }), flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', zIndex: 99999, - height: AppSizes.heightPercentageToDP(9) + (Platform.OS === 'ios' ? AppSizes.statusBarHeight : 0), backgroundColor: '$background', }, - fixedContainer: { flex: 3, }, diff --git a/src/screens/Events/Details/DetailsView.tsx b/src/screens/Events/Details/DetailsView.tsx index 4916abe19..5159665cf 100644 --- a/src/screens/Events/Details/DetailsView.tsx +++ b/src/screens/Events/Details/DetailsView.tsx @@ -1534,7 +1534,7 @@ class TransactionDetailsView extends Component { onPress: this.showMenu, }} // eslint-disable-next-line react-native/no-inline-styles - containerStyle={asModal && { paddingTop: 0 }} + containerStyle={asModal && { marginTop: 0 }} /> {scamAlert && ( From ecc5049f00cc6e57dc1d4f52bc4b3269f2912a7e Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Tue, 19 Dec 2023 12:19:24 +0100 Subject: [PATCH 005/216] fix: crash when opening xapp when there is no account configured --- .../AccountSwitchElement.tsx | 54 ++++++++++++------- src/locale/en.json | 1 + src/locale/translations/af.json | 1 + src/locale/translations/ar.json | 1 + src/locale/translations/bg.json | 1 + src/locale/translations/bn-BD.json | 1 + src/locale/translations/ca.json | 1 + src/locale/translations/cs.json | 1 + src/locale/translations/da.json | 1 + src/locale/translations/de.json | 1 + src/locale/translations/el.json | 1 + src/locale/translations/en-AU.json | 1 + src/locale/translations/es-419.json | 1 + src/locale/translations/es.json | 1 + src/locale/translations/et.json | 1 + src/locale/translations/eu.json | 1 + src/locale/translations/fi.json | 1 + src/locale/translations/fil.json | 1 + src/locale/translations/fr.json | 1 + src/locale/translations/gl-ES.json | 1 + src/locale/translations/gu.json | 1 + src/locale/translations/he.json | 1 + src/locale/translations/hi-IN.json | 1 + src/locale/translations/hr.json | 1 + src/locale/translations/ht.json | 1 + src/locale/translations/hu.json | 1 + src/locale/translations/id.json | 1 + src/locale/translations/it.json | 1 + src/locale/translations/ja.json | 1 + src/locale/translations/ka.json | 1 + src/locale/translations/kk.json | 1 + src/locale/translations/kn.json | 1 + src/locale/translations/ko.json | 1 + src/locale/translations/lt.json | 1 + src/locale/translations/lv.json | 1 + src/locale/translations/ml.json | 1 + src/locale/translations/mr.json | 1 + src/locale/translations/nl.json | 1 + src/locale/translations/no-NO.json | 1 + src/locale/translations/pa.json | 1 + src/locale/translations/pl.json | 1 + src/locale/translations/pt-BR.json | 1 + src/locale/translations/pt.json | 1 + src/locale/translations/ro.json | 1 + src/locale/translations/ru.json | 1 + src/locale/translations/sd.json | 1 + src/locale/translations/sk.json | 1 + src/locale/translations/sl.json | 1 + src/locale/translations/sr.json | 1 + src/locale/translations/sv.json | 1 + src/locale/translations/sw.json | 1 + src/locale/translations/ta-IN.json | 1 + src/locale/translations/te-IN.json | 1 + src/locale/translations/tr.json | 1 + src/locale/translations/uk.json | 1 + src/locale/translations/ur.json | 1 + src/locale/translations/uz.json | 1 + src/locale/translations/vi.json | 1 + src/locale/translations/zh-TW.json | 1 + src/locale/translations/zh.json | 1 + .../Modal/XAppBrowser/XAppBrowserModal.tsx | 46 +++++++++++++++- src/screens/Modal/XAppBrowser/styles.tsx | 6 +++ 62 files changed, 145 insertions(+), 20 deletions(-) diff --git a/src/components/Modules/AccountSwitchElement/AccountSwitchElement.tsx b/src/components/Modules/AccountSwitchElement/AccountSwitchElement.tsx index 1c996eb32..d663bda3d 100644 --- a/src/components/Modules/AccountSwitchElement/AccountSwitchElement.tsx +++ b/src/components/Modules/AccountSwitchElement/AccountSwitchElement.tsx @@ -11,7 +11,7 @@ import { Icon, TouchableDebounce } from '@components/General'; import { AppStyles } from '@theme'; import styles from './styles'; - +import Locale from '@locale'; /* Types ==================================================================== */ interface Props { account: AccountModel; @@ -44,36 +44,52 @@ class AccountSwitchElement extends Component { onSwitcherClose = () => { const { onSwitcherClose } = this.props; - this.setState({ - isSwitcherOpen: false, - }); - - if (typeof onSwitcherClose === 'function') { - onSwitcherClose(); - } + this.setState( + { + isSwitcherOpen: false, + }, + () => { + if (typeof onSwitcherClose === 'function') { + onSwitcherClose(); + } + }, + ); }; onPress = () => { const { onAccountSwitch, showAddAccountButton, discreet } = this.props; // set the tracker flag to true - this.setState({ - isSwitcherOpen: true, - }); - - // open the switcher overlay - Navigator.showOverlay(AppScreens.Overlay.SwitchAccount, { - discreetMode: discreet, - showAddAccountButton, - onClose: this.onSwitcherClose, - onSwitch: onAccountSwitch, - }); + this.setState( + { + isSwitcherOpen: true, + }, + () => { + // open the switcher overlay + Navigator.showOverlay(AppScreens.Overlay.SwitchAccount, { + discreetMode: discreet, + showAddAccountButton, + onClose: this.onSwitcherClose, + onSwitch: onAccountSwitch, + }); + }, + ); }; render() { const { account, discreet, containerStyle } = this.props; const { isSwitcherOpen } = this.state; + if (!account) { + return ( + + + {Locale.t('global.noAccountConfigured')} + + + ); + } + return ( diff --git a/src/locale/en.json b/src/locale/en.json index 308f8ac38..31033dfe8 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Unable to open return URL!", "noAccountConfigured": "No account configured", "pleaseAddAccountToSignTheTransaction": "Please add an account to sign the transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "There is currently no available balance for sending payments.", "doNotRemindMe": "Don't remind me again", "invalidPayload": "Invalid payload", diff --git a/src/locale/translations/af.json b/src/locale/translations/af.json index 0e1abf992..e62970e08 100644 --- a/src/locale/translations/af.json +++ b/src/locale/translations/af.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Nie in staat om terugkeer na URL!", "noAccountConfigured": "Geen rekening ingestel", "pleaseAddAccountToSignTheTransaction": "Voeg n rekening by om die transaksie te onderteken.", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Geen bestedende rekening is beskikbaar vir die stuur van betalings nie.", "doNotRemindMe": "Moet my nie weer herinner nie.", "invalidPayload": "Ongeldige loonvrag", diff --git a/src/locale/translations/ar.json b/src/locale/translations/ar.json index 886f72b45..3310ca2d5 100644 --- a/src/locale/translations/ar.json +++ b/src/locale/translations/ar.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "غير قادر على فتح رابط العودة!", "noAccountConfigured": "لم تتم تهيئة الحساب", "pleaseAddAccountToSignTheTransaction": "الرجاء إضافة حساب للتوقيع على الصفقة", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "لا يوجد حساب قابل للإنفاق متاح لإرسال الدفعات.", "doNotRemindMe": "لا تذكرني مجدداً ", "invalidPayload": "حمولة غير صالحة", diff --git a/src/locale/translations/bg.json b/src/locale/translations/bg.json index cdddf7152..249bab5ca 100644 --- a/src/locale/translations/bg.json +++ b/src/locale/translations/bg.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Не може да се отвори return url адрес!", "noAccountConfigured": "Няма конфигуриран акаунт", "pleaseAddAccountToSignTheTransaction": "Моля, добавете акаунт за подписване на транзакцията", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Няма налична сметка за изпращане на плащания.", "doNotRemindMe": "Не ми напомняйте отново", "invalidPayload": "Невалиден payload", diff --git a/src/locale/translations/bn-BD.json b/src/locale/translations/bn-BD.json index 5af45c613..cfeb11bf9 100644 --- a/src/locale/translations/bn-BD.json +++ b/src/locale/translations/bn-BD.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "রিটার্ন ইউআরএল খুলতে অক্ষম!", "noAccountConfigured": "কোনও অ্যাকাউন্ট কনফিগার করা নেই", "pleaseAddAccountToSignTheTransaction": "লেনদেনে স্বাক্ষর করতে দয়া করে একটি অ্যাকাউন্ট যুক্ত করুন", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "পেমেন্ট প্রেরণের জন্য কোনও ব্যয়যোগ্য অ্যাকাউন্ট পাওয়া যায় না।", "doNotRemindMe": "আমাকে আবার মনে করিয়ে দিবেন না", "invalidPayload": "অবৈধ পেলোড", diff --git a/src/locale/translations/ca.json b/src/locale/translations/ca.json index e59fe5c07..d2df04d2f 100644 --- a/src/locale/translations/ca.json +++ b/src/locale/translations/ca.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "No es pot obrir l'URL de retorn.", "noAccountConfigured": "No s'ha configurat cap compte", "pleaseAddAccountToSignTheTransaction": "Si us plau, afegiu un compte per signar la transacció", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "No hi ha cap compte amb saldo des del qual enviar pagaments.", "doNotRemindMe": "No m'ho tornis a recordar", "invalidPayload": "Càrrega útil no vàlida", diff --git a/src/locale/translations/cs.json b/src/locale/translations/cs.json index d606ed926..6da7f4b06 100644 --- a/src/locale/translations/cs.json +++ b/src/locale/translations/cs.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Nelze otevřít adresu URL pro návrat!", "noAccountConfigured": "Není nastavený žádný účet", "pleaseAddAccountToSignTheTransaction": "Přidejte prosím účet pro podepsání transakce", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Není dostupný žádný účet, ze kterého by bylo možné posílat platby.", "doNotRemindMe": "Nepřipomínej mi to znovu", "invalidPayload": "Neplatná částka", diff --git a/src/locale/translations/da.json b/src/locale/translations/da.json index f5005e5f8..65336c734 100644 --- a/src/locale/translations/da.json +++ b/src/locale/translations/da.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Kan ikke åbne retur-URL!", "noAccountConfigured": "Ingen konto konfigureret", "pleaseAddAccountToSignTheTransaction": "Tilføj venligst en konto for at underskrive transaktionen", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Der er ingen tilgængelig saldo til afsendelse af betalinger.", "doNotRemindMe": "Påmind mig ikke igen", "invalidPayload": "Ugyldig data i overførsel", diff --git a/src/locale/translations/de.json b/src/locale/translations/de.json index ec8621895..7dbd03a64 100644 --- a/src/locale/translations/de.json +++ b/src/locale/translations/de.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Rückgabe-URL kann nicht geöffnet werden!", "noAccountConfigured": "Kein Konto konfiguriert", "pleaseAddAccountToSignTheTransaction": "Bitte füge einen Account hinzu, um die Transaktion zu bestätigen.", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Es ist kein ausgabefähiger Account verfügbar um Zahlungen zu senden.", "doNotRemindMe": "Erinnere mich nicht noch einmal", "invalidPayload": "Ungültige Nutzdaten", diff --git a/src/locale/translations/el.json b/src/locale/translations/el.json index 150de9f59..267ea5a3c 100644 --- a/src/locale/translations/el.json +++ b/src/locale/translations/el.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Αδυναμία ανοίγματος url!", "noAccountConfigured": "Δεν έχει ρυθμιστεί λογαριασμός", "pleaseAddAccountToSignTheTransaction": "Προσθέστε ένα λογαριασμό για να επιβεβαιώσετε τη συναλλαγή", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Δεν υπάρχει διαθέσιμος λογαριασμός για αποστολή συναλλαγών.", "doNotRemindMe": "Δεν θέλω ξανά υπενθύμιση", "invalidPayload": "Μη έγκυρο payload", diff --git a/src/locale/translations/en-AU.json b/src/locale/translations/en-AU.json index bb3f6a37d..79f027097 100644 --- a/src/locale/translations/en-AU.json +++ b/src/locale/translations/en-AU.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Unable to open return URL!", "noAccountConfigured": "No account configured!", "pleaseAddAccountToSignTheTransaction": "Please add an account to sign the transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "No spendable account is available for sending payments.", "doNotRemindMe": "Don't remind me again", "invalidPayload": "Invalid payload", diff --git a/src/locale/translations/es-419.json b/src/locale/translations/es-419.json index 169226431..d981a5801 100644 --- a/src/locale/translations/es-419.json +++ b/src/locale/translations/es-419.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "¡No se puede abrir la URL!", "noAccountConfigured": "Ninguna cuenta configurada", "pleaseAddAccountToSignTheTransaction": "Por favor, agrega una cuenta para firmar la transacción.", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "No existe una cuenta disponible para enviar el pago.", "doNotRemindMe": "No me lo recuerdes de nuevo", "invalidPayload": "Payload inválida", diff --git a/src/locale/translations/es.json b/src/locale/translations/es.json index ba4c66dfc..47dc6408a 100644 --- a/src/locale/translations/es.json +++ b/src/locale/translations/es.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "¡No se puede abrir la URL de retorno!", "noAccountConfigured": "Ninguna cuenta configurada", "pleaseAddAccountToSignTheTransaction": "Por favor, agrega una cuenta para firmar la transacción.", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "No hay una cuenta con fondos disponible para enviar pagos.", "doNotRemindMe": "No volver a recordar", "invalidPayload": "Payload inválida", diff --git a/src/locale/translations/et.json b/src/locale/translations/et.json index b721dd38a..87d69e308 100644 --- a/src/locale/translations/et.json +++ b/src/locale/translations/et.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "URL-i avamine nurjus!", "noAccountConfigured": "Kontot pole seadistatud", "pleaseAddAccountToSignTheTransaction": "Palun lisa konto tehingu allkirjastamiseks", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Maksete saatmiseks ei ole loodud kulutamise kontot.", "doNotRemindMe": "Ära rohkem tuleta meelde", "invalidPayload": "Vigane veokoormus", diff --git a/src/locale/translations/eu.json b/src/locale/translations/eu.json index c9fc9a7dc..3890852d5 100644 --- a/src/locale/translations/eu.json +++ b/src/locale/translations/eu.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Ezin da itzulera url ireki!", "noAccountConfigured": "Ez dago konturik konfiguratuta", "pleaseAddAccountToSignTheTransaction": "Mesedez gehitu kontu bat transakzioa sinatzeko", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Ordainketak bidaltzeko ez dago gastatzeko konturik erabilgarri.", "doNotRemindMe": "Ez nazazu berriro gogoratu", "invalidPayload": "Karga baliogabea", diff --git a/src/locale/translations/fi.json b/src/locale/translations/fi.json index 0691d8308..efe41e035 100644 --- a/src/locale/translations/fi.json +++ b/src/locale/translations/fi.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Paluuosoitteen avaus ei onnistu!", "noAccountConfigured": "Tiliä ei ole määritetty", "pleaseAddAccountToSignTheTransaction": "Lisää tili allekirjoitusta varten", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Maksujen lähettämiseen ei ole käytettävissä tiliä.", "doNotRemindMe": "Älä muistuta uudelleen", "invalidPayload": "Virheellinen hyötykuorma", diff --git a/src/locale/translations/fil.json b/src/locale/translations/fil.json index 61918c87a..96beba05e 100644 --- a/src/locale/translations/fil.json +++ b/src/locale/translations/fil.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Hindi mabuksan ang url ng pagbalik!", "noAccountConfigured": "Walang account isinaayos", "pleaseAddAccountToSignTheTransaction": "Mangyaring magdagdag ng isang account upang lagdaan ang transaksyon", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Kasalukuyang walang magagamit na balanse para sa pagpapadala ng mga pagbabayad.", "doNotRemindMe": "Huwag ipaalala sa akin muli", "invalidPayload": "Di-wastong kargada", diff --git a/src/locale/translations/fr.json b/src/locale/translations/fr.json index f30febde4..775ae46cb 100644 --- a/src/locale/translations/fr.json +++ b/src/locale/translations/fr.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Impossible d'ouvrir l'URL de retour!", "noAccountConfigured": "Aucun compte configuré", "pleaseAddAccountToSignTheTransaction": "Veuillez ajouter un compte pour signer la transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Aucun compte utilisable n'est disponible pour l'envoi de paiements.", "doNotRemindMe": "Ne me rappelle plus.", "invalidPayload": "Charge utile invalide", diff --git a/src/locale/translations/gl-ES.json b/src/locale/translations/gl-ES.json index 3f6cbb36f..5ad4b8e5e 100644 --- a/src/locale/translations/gl-ES.json +++ b/src/locale/translations/gl-ES.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Non se puido abri-la ligazón de retorno.", "noAccountConfigured": "Non hai contas configuradas", "pleaseAddAccountToSignTheTransaction": "Por favor engada unha conta para asina-la transacción", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Non hai contas dispoñibles con saldo gastable para enviar pagos.", "doNotRemindMe": "Non lembrar de novo", "invalidPayload": "Carga non válida", diff --git a/src/locale/translations/gu.json b/src/locale/translations/gu.json index 2156b319b..675e42473 100644 --- a/src/locale/translations/gu.json +++ b/src/locale/translations/gu.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "રીટર્ન યુઆરએલ ખોલવામાં અસમર્થ!", "noAccountConfigured": "કોઈ એકાઉન્ટ ગોઠવેલ નથી", "pleaseAddAccountToSignTheTransaction": "ટ્રાંઝેક્શન પર સહી કરવા માટે કૃપા કરીને એક એકાઉન્ટ ઉમેરો", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "ચુકવણી મોકલવા માટે કોઈ ખર્ચ કરવા યોગ્ય એકાઉન્ટ ઉપલબ્ધ નથી.", "doNotRemindMe": "મને ફરીથી યાદ રાખો નહિં", "invalidPayload": "અમાન્ય પેલોડ", diff --git a/src/locale/translations/he.json b/src/locale/translations/he.json index 184c67705..f60bf3ba6 100644 --- a/src/locale/translations/he.json +++ b/src/locale/translations/he.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "לא ניתן לפתוח את כתובת האתר החוזרת!", "noAccountConfigured": "לא הוגדר חשבון", "pleaseAddAccountToSignTheTransaction": "יש להוסיף חשבון כדי לחתום על הטרנזקציה", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "כרגע אין יתרה זמינה למשלוח תשלומים.", "doNotRemindMe": "אל תזכיר לי שוב את זה", "invalidPayload": "מטען לא חוקי", diff --git a/src/locale/translations/hi-IN.json b/src/locale/translations/hi-IN.json index 37b3e502a..6d3c19d81 100644 --- a/src/locale/translations/hi-IN.json +++ b/src/locale/translations/hi-IN.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "वापसी url खोलने में असमर्थ!", "noAccountConfigured": "कोई खाता कॉन्फ़िगर नहीं किया गया", "pleaseAddAccountToSignTheTransaction": "लेन-देन पर हस्ताक्षर करने के लिए कृपया एक खाता जोड़ें", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "भुगतान भेजने के लिए कोई खर्च करने योग्य खाता उपलब्ध नहीं है।", "doNotRemindMe": "मुझे फिर से याद न दिलाएं", "invalidPayload": "अवैध पेलोड", diff --git a/src/locale/translations/hr.json b/src/locale/translations/hr.json index 765f861c3..6e739e7a8 100644 --- a/src/locale/translations/hr.json +++ b/src/locale/translations/hr.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Ne može se otvoriti povratni URL!", "noAccountConfigured": "Nije konfiguriran nijedan račun", "pleaseAddAccountToSignTheTransaction": "Dodajte račun kako biste mogli potpisati transakciju", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Nijedan potrošni račun nije dostupan za slanje uplata.", "doNotRemindMe": "Nemoj me više podsjećati", "invalidPayload": "Nevažeći payload", diff --git a/src/locale/translations/ht.json b/src/locale/translations/ht.json index 968217623..962f92757 100644 --- a/src/locale/translations/ht.json +++ b/src/locale/translations/ht.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Kapab louvri URL retounen!", "noAccountConfigured": "Pa gen kont configuré", "pleaseAddAccountToSignTheTransaction": "Tanpri ajoute yon kont pou siyen tranzaksyon an", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Kounye a pa gen okenn balans ki disponib pou voye peman yo.", "doNotRemindMe": "Pa raple m 'ankò", "invalidPayload": "Envalid chaj", diff --git a/src/locale/translations/hu.json b/src/locale/translations/hu.json index 5d6be4f60..f8f79a46c 100644 --- a/src/locale/translations/hu.json +++ b/src/locale/translations/hu.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Unable to open return URL!", "noAccountConfigured": "No account configured", "pleaseAddAccountToSignTheTransaction": "Please add an account to sign the transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "There is currently no available balance for sending payments.", "doNotRemindMe": "Don't remind me again", "invalidPayload": "Invalid payload", diff --git a/src/locale/translations/id.json b/src/locale/translations/id.json index 55e5aef5a..464b4e74d 100644 --- a/src/locale/translations/id.json +++ b/src/locale/translations/id.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Tidak dapat membuka URL kembali!", "noAccountConfigured": "Tidak ada akun yang dikonfigurasi", "pleaseAddAccountToSignTheTransaction": "Harap tambahkan akun untuk menandatangani transaksi", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Saat ini tidak ada saldo yang tersedia untuk mengirim pembayaran.", "doNotRemindMe": "Jangan ingatkan saya lagi", "invalidPayload": "Payload tidak valid", diff --git a/src/locale/translations/it.json b/src/locale/translations/it.json index 44dea8ee5..c136a9f98 100644 --- a/src/locale/translations/it.json +++ b/src/locale/translations/it.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Impossibile aprire l'URL di ritorno!", "noAccountConfigured": "Nessun account configurato", "pleaseAddAccountToSignTheTransaction": "Per cortesia aggiungi un account per firmare la transazione", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Non c'è alcun account spendibile per l'invio di pagamenti.", "doNotRemindMe": "Non ricordarmelo più", "invalidPayload": "Ammontare non corretto", diff --git a/src/locale/translations/ja.json b/src/locale/translations/ja.json index 0cc793e8e..1c6fb020d 100644 --- a/src/locale/translations/ja.json +++ b/src/locale/translations/ja.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "URLを開くことができません!", "noAccountConfigured": "アカウントが設定されていません", "pleaseAddAccountToSignTheTransaction": "取引に署名するためにアカウントを追加してください", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "送金するための十分な残高がありません。", "doNotRemindMe": "再通知しない", "invalidPayload": "無効なペイロード", diff --git a/src/locale/translations/ka.json b/src/locale/translations/ka.json index 15bdfa37d..764ecccba 100644 --- a/src/locale/translations/ka.json +++ b/src/locale/translations/ka.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "ჩაშენებული ვებ-გვერდის მისამართის გახსნა ვერ ხერხდება! ", "noAccountConfigured": "ანგარიში არ არის კონფიგურირებული", "pleaseAddAccountToSignTheTransaction": "გთხოვთ დაამატეთ ანგარიში ტრანზაქციის დასადასტურებლად ", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "სახარჯო ანგარიში არ არის ხელმისაწვდომი გზავნილის განსახორციელებლად.", "doNotRemindMe": "შემდეგში აღარ შემახსენო ", "invalidPayload": "არასწორი გადაცემული მონაცემი ", diff --git a/src/locale/translations/kk.json b/src/locale/translations/kk.json index 7a35f1f89..fb6178ef1 100644 --- a/src/locale/translations/kk.json +++ b/src/locale/translations/kk.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Кері URL мекенжайын ашу мүмкін емес!", "noAccountConfigured": "Тіркелгі орнатылмаған", "pleaseAddAccountToSignTheTransaction": "Транзакцияға қол қою үшін есептік жазбаны қосыңыз", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Қазіргі уақытта төлемдерді жіберу үшін қол жетімді баланс жоқ.", "doNotRemindMe": "Маған көп еске салмаңыз", "invalidPayload": "Жол берілмейтін ақылы жүктеме", diff --git a/src/locale/translations/kn.json b/src/locale/translations/kn.json index aa999e73e..c7e9cf1c2 100644 --- a/src/locale/translations/kn.json +++ b/src/locale/translations/kn.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "ರಿಟರ್ನ್ url ತೆರೆಯಲು ಸಾಧ್ಯವಿಲ್ಲ!", "noAccountConfigured": "ಯಾವುದೇ ಖಾತೆಯನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿಲ್ಲ", "pleaseAddAccountToSignTheTransaction": "ವ್ಯವಹಾರಕ್ಕೆ ಸಹಿ ಮಾಡಲು ದಯವಿಟ್ಟು ಖಾತೆಯನ್ನು ಸೇರಿಸಿ", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "ಪಾವತಿಗಳನ್ನು ಕಳುಹಿಸಲು ಖರ್ಚು ಮಾಡಬಹುದಾದ ಯಾವುದೇ ಖಾತೆ ಲಭ್ಯವಿಲ್ಲ.", "doNotRemindMe": "ನನ್ನನ್ನು ಮತ್ತೆ ನೆನಪಿಸಬೇಡಿ", "invalidPayload": "ಅಮಾನ್ಯ ಪೇಲೋಡ್", diff --git a/src/locale/translations/ko.json b/src/locale/translations/ko.json index 5e042f59b..4d7bd8313 100644 --- a/src/locale/translations/ko.json +++ b/src/locale/translations/ko.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "사이트에 연결할 수 없음!", "noAccountConfigured": "형성된 계정이 없습니다", "pleaseAddAccountToSignTheTransaction": "거래에 서명하려면 계정을 추가하십시오.", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "지불 가능한 계좌가 없습니다.", "doNotRemindMe": "다시 알림 창을 표시하지 않습니다.", "invalidPayload": "유효하지 않은 페이로드", diff --git a/src/locale/translations/lt.json b/src/locale/translations/lt.json index 3e063c056..27a194fb8 100644 --- a/src/locale/translations/lt.json +++ b/src/locale/translations/lt.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Nepavyko atidaryti grąžinimo URL!", "noAccountConfigured": "Nėra sukonfigūruota paskyra", "pleaseAddAccountToSignTheTransaction": "Prašome pridėti sąskaitą norint pasirašyti pavedimą", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Šiuo metu nėra galimo mokėjimų balanso", "doNotRemindMe": "Daugiau nepriminti", "invalidPayload": "Neteisinga naudingoji apkrova", diff --git a/src/locale/translations/lv.json b/src/locale/translations/lv.json index a1e6ceb89..2717ea30b 100644 --- a/src/locale/translations/lv.json +++ b/src/locale/translations/lv.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Nav iespējams atvērt tīmekļa adresi!", "noAccountConfigured": "Konts nav konfigurēts", "pleaseAddAccountToSignTheTransaction": "Lūdzu, pievienojiet kontu, lai parakstītu darījumu", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Maksājumu sūtīšanai nav pievienots izmaksu konts.", "doNotRemindMe": "Neatgādināt vēlreiz", "invalidPayload": "Nederīga datu ielāde", diff --git a/src/locale/translations/ml.json b/src/locale/translations/ml.json index f2c760bd7..9f8bde230 100644 --- a/src/locale/translations/ml.json +++ b/src/locale/translations/ml.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "മടക്കം url തുറക്കാനാവുന്നില്ല!", "noAccountConfigured": "അക്കൗണ്ടുകളൊന്നും കോൺഫിഗർ ചെയ്‌തിട്ടില്ല", "pleaseAddAccountToSignTheTransaction": "ഇടപാടിൽ ഒപ്പിടാൻ ദയവായി ഒരു അക്കൗണ്ട് ചേർക്കുക", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "പേയ്‌മെന്റുകൾ അയയ്‌ക്കുന്നതിന് ചെലവഴിക്കാവുന്ന അക്കൗണ്ടുകളൊന്നും ലഭ്യമല്ല.", "doNotRemindMe": "എന്നെ വീണ്ടും ഓര്മ്മിപ്പിക്കരുത്", "invalidPayload": "പേലോഡ് അസാധുവാണ്", diff --git a/src/locale/translations/mr.json b/src/locale/translations/mr.json index 8f2958b68..8bfd91100 100644 --- a/src/locale/translations/mr.json +++ b/src/locale/translations/mr.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "रिटर्न URL उघडण्यात अक्षम!", "noAccountConfigured": "खाते कॉन्फिगर केलेले नाही", "pleaseAddAccountToSignTheTransaction": "कृपया व्यवहारावर स्वाक्षरी करण्यासाठी खाते जोडा", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "देयके पाठविण्यासाठी सध्या कोणतेही शिल्लक उपलब्ध नाही.", "doNotRemindMe": "मला पुन्हा आठवण करुन देऊ नका", "invalidPayload": "अवैध पेलोड", diff --git a/src/locale/translations/nl.json b/src/locale/translations/nl.json index 43f7e1e83..76ab431db 100644 --- a/src/locale/translations/nl.json +++ b/src/locale/translations/nl.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Kan de URL om naar terug te keren niet openen!", "noAccountConfigured": "Geen account geconfigureerd", "pleaseAddAccountToSignTheTransaction": "Voeg een account toe om de transactie te ondertekenen", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Er is geen rekening beschikbaar waarmee betaald kan worden.", "doNotRemindMe": "Herinner me niet meer", "invalidPayload": "Ongeldige payload", diff --git a/src/locale/translations/no-NO.json b/src/locale/translations/no-NO.json index 12e3956e6..b53f858a6 100644 --- a/src/locale/translations/no-NO.json +++ b/src/locale/translations/no-NO.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Kan ikke åpne retur-url!", "noAccountConfigured": "Ingen konto konfigurert", "pleaseAddAccountToSignTheTransaction": "Vennligst legg inn en konto for å signere transaksjonen", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Det er ingen konto med disponibelt beløp for å sende betalinger.", "doNotRemindMe": "Ikke minn meg på dette igjen", "invalidPayload": "Ugyldig nyttelast", diff --git a/src/locale/translations/pa.json b/src/locale/translations/pa.json index a23c73fc3..2c6a505b1 100644 --- a/src/locale/translations/pa.json +++ b/src/locale/translations/pa.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "ਵਾਪਸੀ ਦਾ URL ਖੋਲ੍ਹਣ ਵਿੱਚ ਅਸਮਰੱਥ!", "noAccountConfigured": "ਕੋਈ ਖਾਤਾ ਕੌਂਫਿਗਰ ਨਹੀਂ ਕੀਤਾ ਗਿਆ", "pleaseAddAccountToSignTheTransaction": "ਟ੍ਰਾਂਜੈਕਸ਼ਨ ਤੇ ਦਸਤਖਤ ਕਰਨ ਲਈ ਕਿਰਪਾ ਕਰਕੇ ਇੱਕ ਖਾਤਾ ਸ਼ਾਮਲ ਕਰੋ", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "ਭੁਗਤਾਨ ਭੇਜਣ ਲਈ ਕੋਈ ਖਰਚਯੋਗ ਖਾਤਾ ਉਪਲਬਧ ਨਹੀਂ ਹੈ.", "doNotRemindMe": "ਮੈਨੂੰ ਦੁਬਾਰਾ ਯਾਦ ਨਾ ਕਰਾਓ", "invalidPayload": "ਅਵੈਧ ਪੇਲੋਡ", diff --git a/src/locale/translations/pl.json b/src/locale/translations/pl.json index a062f71bd..668efc72e 100644 --- a/src/locale/translations/pl.json +++ b/src/locale/translations/pl.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Nie można otworzyć zwrotnego adresu URL!", "noAccountConfigured": "Nie skonfigurowano żadnego konta", "pleaseAddAccountToSignTheTransaction": "Dodaj konto, aby podpisać transakcję", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Brak konta przeznaczonego do wysyłania płatności", "doNotRemindMe": "Nie przypominaj mi ponownie", "invalidPayload": "Nieprawidłowa zawartość", diff --git a/src/locale/translations/pt-BR.json b/src/locale/translations/pt-BR.json index 1764b7960..5d8cfdd17 100644 --- a/src/locale/translations/pt-BR.json +++ b/src/locale/translations/pt-BR.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Não foi possível abrir o URL de retorno!", "noAccountConfigured": "Sem contas configuradas", "pleaseAddAccountToSignTheTransaction": "Por favor adicione uma conta para assinar a transação", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Nenhuma conta gastável disponível para enviar pagamentos.", "doNotRemindMe": "Não me lembrar de novo", "invalidPayload": "Payload inválido", diff --git a/src/locale/translations/pt.json b/src/locale/translations/pt.json index af9eacc7f..075b955c9 100644 --- a/src/locale/translations/pt.json +++ b/src/locale/translations/pt.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Não foi possível abrir o URL de retorno!", "noAccountConfigured": "Nenhuma conta configurada.", "pleaseAddAccountToSignTheTransaction": "Por favor, adicione uma conta para assinar a transação", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Neste momento não há saldo disponivel para enviar pagamentos.", "doNotRemindMe": "Não me lembrar novamente", "invalidPayload": "Payload inválido", diff --git a/src/locale/translations/ro.json b/src/locale/translations/ro.json index 30ea7dfa8..a5da12214 100644 --- a/src/locale/translations/ro.json +++ b/src/locale/translations/ro.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "URL-ul indicat nu poate fi deschis.", "noAccountConfigured": "Niciun cont configurat", "pleaseAddAccountToSignTheTransaction": "Vă rugăm să adăugaţi un cont pentru a aproba tranzacţia. ", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Niciun cont de cheltuieli nu este disponibil pentru a efectua plăți.", "doNotRemindMe": "Nu-mi reaminti", "invalidPayload": "Conținutul cererii de aprobare este invalid.", diff --git a/src/locale/translations/ru.json b/src/locale/translations/ru.json index b1ce3879f..e213a0575 100644 --- a/src/locale/translations/ru.json +++ b/src/locale/translations/ru.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Не удалось открыть обратный URL адрес!", "noAccountConfigured": "Нет настроенных аккаунтов", "pleaseAddAccountToSignTheTransaction": "Пожалуйста, добавьте аккаунт, чтобы подписать транзакцию", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Для отправки платежей нет аккаунта со средствами доступными для трат.", "doNotRemindMe": "Не напоминать мне снова", "invalidPayload": "Неправильный payload", diff --git a/src/locale/translations/sd.json b/src/locale/translations/sd.json index 452e57de0..de23318a8 100644 --- a/src/locale/translations/sd.json +++ b/src/locale/translations/sd.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "واپسي يو آر ايل کولڻ جي قابل نه آهيو!", "noAccountConfigured": "ڪوبه کاتو ترتيب نه ڏنل آهي", "pleaseAddAccountToSignTheTransaction": "مهرباني ڪري ٽرانزيڪشن تي دستخط ٿيڻ لاءِ هڪ اڪائونٽ شامل ڪيو", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "ادائيگي موڪلڻ لاءِ في الحال ڪوبه بيلنس موجود ناهي.", "doNotRemindMe": "مون کي وري نصيحت نه ڪريو", "invalidPayload": "غلط پي لوڊ لوڊ", diff --git a/src/locale/translations/sk.json b/src/locale/translations/sk.json index 169749131..dceeb3d63 100644 --- a/src/locale/translations/sk.json +++ b/src/locale/translations/sk.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Spätnú webovú adresu sa nepodarilo otvoriť!", "noAccountConfigured": "Nie je priradený žiadny účet", "pleaseAddAccountToSignTheTransaction": "Pridajte účet aby ste mohli podpísať transakciu", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Na odosielanie platieb nie je k dispozícii žiadny účet.", "doNotRemindMe": "Nepripomínať znovu", "invalidPayload": "Neplatné zaťaženie", diff --git a/src/locale/translations/sl.json b/src/locale/translations/sl.json index bb1e4baf4..f031dc527 100644 --- a/src/locale/translations/sl.json +++ b/src/locale/translations/sl.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Ne morem odpreti povratnega url-ja!", "noAccountConfigured": "Noben račun ni konfiguriran", "pleaseAddAccountToSignTheTransaction": "Če želite podpisati transakcijo, dodajte račun", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Za pošiljanje plačil ni na voljo nobenega potrošnega računa.", "doNotRemindMe": "Ne opominjaj me več", "invalidPayload": "Neveljavna vsebina", diff --git a/src/locale/translations/sr.json b/src/locale/translations/sr.json index 59a2cd210..4e42a0bc3 100644 --- a/src/locale/translations/sr.json +++ b/src/locale/translations/sr.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Није могуће отворити повратну URL адресу!", "noAccountConfigured": "Ниједан налог није подешен", "pleaseAddAccountToSignTheTransaction": "Додајте налог да бисте потписали трансакцију", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Није доступан налог за слање плаћања.", "doNotRemindMe": "Не подсећај ме поново", "invalidPayload": "Неважећи терет", diff --git a/src/locale/translations/sv.json b/src/locale/translations/sv.json index 255ee22cc..7a5116c96 100644 --- a/src/locale/translations/sv.json +++ b/src/locale/translations/sv.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Det går inte att öppna returlänken.", "noAccountConfigured": "Inget konto konfigurerat", "pleaseAddAccountToSignTheTransaction": "Lägg till ett konto för att signera transaktionen", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Det finns inga tillgängliga medel för att kunna utföra betalningar.", "doNotRemindMe": "Påminn mig inte igen", "invalidPayload": "Ogiltig data", diff --git a/src/locale/translations/sw.json b/src/locale/translations/sw.json index 33d06bbaa..a92c2f5e3 100644 --- a/src/locale/translations/sw.json +++ b/src/locale/translations/sw.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Unable to open return URL!", "noAccountConfigured": "No account configured", "pleaseAddAccountToSignTheTransaction": "Please add an account to sign the transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "There is currently no available balance for sending payments.", "doNotRemindMe": "Don't remind me again", "invalidPayload": "Invalid payload", diff --git a/src/locale/translations/ta-IN.json b/src/locale/translations/ta-IN.json index d7a6a7d2b..ca63b2a60 100644 --- a/src/locale/translations/ta-IN.json +++ b/src/locale/translations/ta-IN.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "திரும்பும் URL ஐ திறக்க முடியவில்லை!", "noAccountConfigured": "கணக்கு எதுவும் கட்டமைக்கப்படவில்லை", "pleaseAddAccountToSignTheTransaction": "பரிவர்த்தனையில் கையொப்பமிட ஒரு கணக்கைச் சேர்க்கவும்", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "கொடுப்பனவுகளை அனுப்புவதற்கு செலவிடக்கூடிய கணக்கு எதுவும் கிடைக்கவில்லை.", "doNotRemindMe": "மீண்டும் என்னை நினைவுபடுத்த வேண்டாம்", "invalidPayload": "தவறான பேலோட்", diff --git a/src/locale/translations/te-IN.json b/src/locale/translations/te-IN.json index 22c014fb2..8174a0c01 100644 --- a/src/locale/translations/te-IN.json +++ b/src/locale/translations/te-IN.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "రిటర్న్ url తెరవడం సాధ్యం కాలేదు!\r\n", "noAccountConfigured": "ఖాతా కాన్ఫిగర్ చేయబడలేదు\r\n", "pleaseAddAccountToSignTheTransaction": "లావాదేవీపై సంతకం చేయడానికి దయచేసి ఒక ఖాతాను జోడించండి\r\n", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "చెల్లింపులు పంపడానికి ఖర్చు చేయదగిన ఖాతా అందుబాటులో లేదు.\r\n", "doNotRemindMe": "నాకు మళ్ళీ గుర్తు చేయవద్దు", "invalidPayload": "చెల్లని పేలోడ్\r\n", diff --git a/src/locale/translations/tr.json b/src/locale/translations/tr.json index e80dd04ac..edbb2b065 100644 --- a/src/locale/translations/tr.json +++ b/src/locale/translations/tr.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Dönüş URL'si açılamıyor!", "noAccountConfigured": "Hiçbir hesap yapılandırılmadı", "pleaseAddAccountToSignTheTransaction": "Lütfen işlemi imzalamak için bir hesap ekleyin", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Şu anda ödeme göndermek için yeterli bakiye yok.", "doNotRemindMe": "Bir daha hatırlatma", "invalidPayload": "Geçersiz ödeme", diff --git a/src/locale/translations/uk.json b/src/locale/translations/uk.json index dea7d229b..49962efd8 100644 --- a/src/locale/translations/uk.json +++ b/src/locale/translations/uk.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Не вдається відкрити зворотну URL-адресу!", "noAccountConfigured": "Акаунт не налаштовано", "pleaseAddAccountToSignTheTransaction": "Будь ласка, додайте акаунт, щоб підписати транзакцію", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Для відправлення платежів не має акаунта з коштами доступними для витрат.", "doNotRemindMe": "Не нагадувати мені більше", "invalidPayload": "Невірний payload", diff --git a/src/locale/translations/ur.json b/src/locale/translations/ur.json index f485356be..3663f2b00 100644 --- a/src/locale/translations/ur.json +++ b/src/locale/translations/ur.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "واپسی کا URL کھولنے سے قاصر ہے!", "noAccountConfigured": "کوئی اکاؤنٹ تشکیل نہیں دیا گیا ہے", "pleaseAddAccountToSignTheTransaction": "براہ کرم سودے پر دستخط کرنے کے لئے ایک اکاؤنٹ شامل کریں", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "ادائیگی بھیجنے کے لئے فی الحال کوئی دستیاب بیلنس موجود نہیں ہے۔", "doNotRemindMe": "مجھے دوبارہ یاد دلانا نہیں", "invalidPayload": "غلط پے لوڈ", diff --git a/src/locale/translations/uz.json b/src/locale/translations/uz.json index cfce04c9d..89a23273f 100644 --- a/src/locale/translations/uz.json +++ b/src/locale/translations/uz.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Qaytish URL ochib bulmayapti!", "noAccountConfigured": "Hech qanday hisob sozlanmagan", "pleaseAddAccountToSignTheTransaction": "Iltimos, bitimni tasdiqlash uchun hisob qaydnomasini qo'shing", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Hozirda to'lovlarni jo'natish uchun etarlik mablag 'mavjud emas.", "doNotRemindMe": "Menga boshqa eslatmang", "invalidPayload": "Notugri amaliyot", diff --git a/src/locale/translations/vi.json b/src/locale/translations/vi.json index eae2bfae6..058406cda 100644 --- a/src/locale/translations/vi.json +++ b/src/locale/translations/vi.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Không thể mở URL trả lại!", "noAccountConfigured": "Không có tài khoản cấu hình", "pleaseAddAccountToSignTheTransaction": "Vui lòng thêm tài khoản để ký giao dịch", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "Hiện không có số dư khả dụng để gửi thanh toán.", "doNotRemindMe": "Đừng nhắc tôi nữa", "invalidPayload": "Trọng tải không hợp lệ", diff --git a/src/locale/translations/zh-TW.json b/src/locale/translations/zh-TW.json index 4065f0bdb..80901b5c1 100644 --- a/src/locale/translations/zh-TW.json +++ b/src/locale/translations/zh-TW.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "Unable to open return URL!", "noAccountConfigured": "No account configured", "pleaseAddAccountToSignTheTransaction": "Please add an account to sign the transaction", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "There is currently no available balance for sending payments.", "doNotRemindMe": "Don't remind me again", "invalidPayload": "Invalid payload", diff --git a/src/locale/translations/zh.json b/src/locale/translations/zh.json index 76ae50e84..48c45a4b6 100644 --- a/src/locale/translations/zh.json +++ b/src/locale/translations/zh.json @@ -261,6 +261,7 @@ "unableOpenReturnURL": "无法打开返回网址!", "noAccountConfigured": "未配置帐户", "pleaseAddAccountToSignTheTransaction": "请添加一个帐户以签署交易", + "pleaseAddAccountToAccessXApp": "Please add an account to access xApp", "noSpendableAccountIsAvailableForSendingPayment": "没有可用的可支出帐户用于发送付款。", "doNotRemindMe": "不要再提醒我", "invalidPayload": "有效载荷无效", diff --git a/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx b/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx index 9866502df..e66264155 100644 --- a/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx +++ b/src/screens/Modal/XAppBrowser/XAppBrowserModal.tsx @@ -41,7 +41,16 @@ import { AccessLevels } from '@store/types'; import { BackendService, NavigationService, PushNotificationsService, StyleService } from '@services'; -import { Avatar, Button, LoadingIndicator, HeartBeatAnimation, Spacer, WebView } from '@components/General'; +import { + Avatar, + Button, + LoadingIndicator, + HeartBeatAnimation, + Spacer, + WebView, + Icon, + InfoMessage, +} from '@components/General'; import { XAppBrowserHeader } from '@components/Modules'; import Localize from '@locale'; @@ -816,6 +825,14 @@ class XAppBrowserModal extends Component { }); }; + onAddAccountPress = async () => { + // close the browser modal and redirect user to add account screen + await Navigator.dismissModal(); + + // push to the screen + Navigator.push(AppScreens.Account.Add); + }; + onLoadEnd = (e: any) => { const { app } = this.state; @@ -853,6 +870,27 @@ class XAppBrowserModal extends Component { }); }; + renderNoAccount = () => { + return ( + + + + {Localize.t('global.noAccountConfigured')} + + + + ); + }; + renderError = () => { const { error } = this.state; @@ -989,8 +1027,14 @@ class XAppBrowserModal extends Component { }; renderContent = () => { + const { account } = this.props; const { isLaunchingApp, isLoadingApp, isAppReady, isRequiredNetworkSwitch, error } = this.state; + // no account configured + if (!account) { + return this.renderNoAccount(); + } + let appView = null; let stateView = null; diff --git a/src/screens/Modal/XAppBrowser/styles.tsx b/src/screens/Modal/XAppBrowser/styles.tsx index 0fc762123..c3151dbc9 100644 --- a/src/screens/Modal/XAppBrowser/styles.tsx +++ b/src/screens/Modal/XAppBrowser/styles.tsx @@ -51,6 +51,12 @@ const styles = StyleService.create({ width: AppSizes.moderateScale(30), height: AppSizes.moderateScale(60), }, + infoIcon: { + tintColor: '$red', + }, + actionContainer: { + marginHorizontal: AppSizes.paddingSml, + }, }); export default styles; From ce49348e66b52f764c06abf7b47deecf38ff3346 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Tue, 19 Dec 2023 12:23:28 +0100 Subject: [PATCH 006/216] fix: xApp store list placeholder color --- .../Modules/XAppStore/AppsList/AppItem/styles.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Modules/XAppStore/AppsList/AppItem/styles.tsx b/src/components/Modules/XAppStore/AppsList/AppItem/styles.tsx index 4dd6af631..872ea0faa 100644 --- a/src/components/Modules/XAppStore/AppsList/AppItem/styles.tsx +++ b/src/components/Modules/XAppStore/AppsList/AppItem/styles.tsx @@ -15,8 +15,8 @@ const styles = StyleService.create({ color: '$textPrimary', }, appTitlePlaceholder: { - color: '$light', - backgroundColor: '$light', + color: StyleService.select({ dark: '$darkGrey', light: '$light' }), + backgroundColor: StyleService.select({ dark: '$darkGrey', light: '$light' }), }, appIcon: { width: '80%', @@ -24,7 +24,7 @@ const styles = StyleService.create({ borderRadius: 10, }, appIconPlaceholder: { - backgroundColor: '$silver', + backgroundColor: StyleService.select({ dark: '$darkGrey', light: '$silver' }), }, titleContainer: { flex: 1, From 4b0248029d095c2a515ec089b2ff4e1180177952 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Tue, 19 Dec 2023 12:37:02 +0100 Subject: [PATCH 007/216] fix(android): checkAppUpdate is not resolving if failed --- android/app/src/main/java/libs/common/AppUpdateModule.java | 3 +++ src/services/AppService.ts | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/libs/common/AppUpdateModule.java b/android/app/src/main/java/libs/common/AppUpdateModule.java index 0731076bc..f2f7e6393 100644 --- a/android/app/src/main/java/libs/common/AppUpdateModule.java +++ b/android/app/src/main/java/libs/common/AppUpdateModule.java @@ -105,6 +105,9 @@ public void checkUpdate(Promise promise) { promise.resolve(false); } }); + appUpdateInfoTask.addOnFailureListener( + promise::reject + ); } catch (Exception e) { promise.reject(e); } diff --git a/src/services/AppService.ts b/src/services/AppService.ts index f8766163e..78eb49bb8 100644 --- a/src/services/AppService.ts +++ b/src/services/AppService.ts @@ -56,7 +56,7 @@ class AppService extends EventEmitter { this.prevAppState = undefined; this.currentAppState = AppStateStatus.Active; - this.logger = LoggerService.createLogger('AppState'); + this.logger = LoggerService.createLogger('AppService'); } initialize = () => { @@ -131,7 +131,8 @@ class AppService extends EventEmitter { ); } }) - .catch(() => { + .catch((error) => { + this.logger.warn('checkAppUpdate', error); // ignore }); }; From 4a99e3c3f091a03560e586bb6bdb2445ba5d22e8 Mon Sep 17 00:00:00 2001 From: N3TC4T Date: Wed, 20 Dec 2023 11:48:44 +0100 Subject: [PATCH 008/216] chore: use flashList for transaction events list --- ios/Podfile.lock | 6 + package-lock.json | 39 +++++ package.json | 1 + .../Modules/EventsList/EventsList.tsx | 162 +++++++++++------- src/components/Modules/EventsList/styles.ts | 1 - src/screens/Events/EventsView.tsx | 65 ++++--- 6 files changed, 190 insertions(+), 84 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3465d93b2..22474224b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -568,6 +568,8 @@ PODS: - FirebaseCoreExtension (= 10.18.0) - React-Core - RNFBApp + - RNFlashList (1.6.3): + - React-Core - RNTangemSdk (2.3.1): - React - TangemSdk (= 3.4.0) @@ -627,6 +629,7 @@ DEPENDENCIES: - "RNFBApp (from `../node_modules/@react-native-firebase/app`)" - "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)" - "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)" + - "RNFlashList (from `../node_modules/@shopify/flash-list`)" - RNTangemSdk (from `../node_modules/tangem-sdk-react-native`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -752,6 +755,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-firebase/crashlytics" RNFBMessaging: :path: "../node_modules/@react-native-firebase/messaging" + RNFlashList: + :path: "../node_modules/@shopify/flash-list" RNTangemSdk: :path: "../node_modules/tangem-sdk-react-native" Yoga: @@ -824,6 +829,7 @@ SPEC CHECKSUMS: RNFBApp: 09fd96441b0f556a1ef50ee70fa72160ae71ecb9 RNFBCrashlytics: 0866393a9fbca1d8d353052243e21d1cdeb55394 RNFBMessaging: 95fa608c79d3378b1a958a64f8be82e4699368a9 + RNFlashList: 4b4b6b093afc0df60ae08f9cbf6ccd4c836c667a RNTangemSdk: b4a4c91c617daca427a69cc7f784425c6789acd7 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 TangemSdk: d782fc8c55cb56ffdfcaf7081422e02b19f18334 diff --git a/package-lock.json b/package-lock.json index 486e8b78f..2e1012c6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@react-native-firebase/app": "18.6.2", "@react-native-firebase/crashlytics": "18.6.2", "@react-native-firebase/messaging": "18.6.2", + "@shopify/flash-list": "^1.6.3", "@veriff/react-native-sdk": "5.1.0", "bignumber.js": "9.1.2", "fuse.js": "6.6.2", @@ -4273,6 +4274,25 @@ "react-native": "*" } }, + "node_modules/@shopify/flash-list": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@shopify/flash-list/-/flash-list-1.6.3.tgz", + "integrity": "sha512-XM2iu4CeD9SOEUxaGG3UkxfUxGPWG9yacga1yQSgskAjUsRDFTsD3y4Dyon9n8MfDwgrRpEwuijd+7NeQQoWaQ==", + "dependencies": { + "recyclerlistview": "4.2.0", + "tslib": "2.4.0" + }, + "peerDependencies": { + "@babel/runtime": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/@shopify/flash-list/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -16731,6 +16751,20 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/recyclerlistview": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.0.tgz", + "integrity": "sha512-uuBCi0c+ggqHKwrzPX4Z/mJOzsBbjZEAwGGmlwpD/sD7raXixdAbdJ6BTcAmuWG50Cg4ru9p12M94Njwhr/27A==", + "dependencies": { + "lodash.debounce": "4.0.8", + "prop-types": "15.8.1", + "ts-object-utils": "0.0.5" + }, + "peerDependencies": { + "react": ">= 15.2.1", + "react-native": ">= 0.30.0" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", @@ -18519,6 +18553,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/ts-object-utils": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/ts-object-utils/-/ts-object-utils-0.0.5.tgz", + "integrity": "sha512-iV0GvHqOmilbIKJsfyfJY9/dNHCs969z3so90dQWsO1eMMozvTpnB1MEaUbb3FYtZTGjv5sIy/xmslEz0Rg2TA==" + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", diff --git a/package.json b/package.json index 8b1618419..a645772e7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@react-native-firebase/app": "18.6.2", "@react-native-firebase/crashlytics": "18.6.2", "@react-native-firebase/messaging": "18.6.2", + "@shopify/flash-list": "1.6.3", "@veriff/react-native-sdk": "5.1.0", "bignumber.js": "9.1.2", "fuse.js": "6.6.2", diff --git a/src/components/Modules/EventsList/EventsList.tsx b/src/components/Modules/EventsList/EventsList.tsx index 44b5e78df..df874fc92 100644 --- a/src/components/Modules/EventsList/EventsList.tsx +++ b/src/components/Modules/EventsList/EventsList.tsx @@ -1,7 +1,7 @@ -import moment from 'moment-timezone'; - import React, { PureComponent } from 'react'; -import { View, Text, SectionList, RefreshControl } from 'react-native'; +import { View, Text, RefreshControl } from 'react-native'; + +import { FlashList } from '@shopify/flash-list'; import { AccountModel } from '@store/models'; @@ -20,11 +20,28 @@ import styles from './styles'; import * as EventListItems from './EventListItems'; /* Types ==================================================================== */ +export enum DataSourceItemType { + 'RowItem' = 'RowItem', + 'SectionHeader' = 'SectionHeader', +} + +export type RowDataSourceItem = { + data: BaseTransaction | BaseLedgerObject | Payload; + type: DataSourceItemType.RowItem; +}; + +export type SectionHeaderDataSourceItem = { + data: string; + type: DataSourceItemType.SectionHeader; +}; + +export type DataSourceItem = RowDataSourceItem | SectionHeaderDataSourceItem; + interface Props { account: AccountModel; isLoading?: boolean; isLoadingMore?: boolean; - dataSource: any; + dataSource: Array; headerComponent?: any; timestamp?: number; onRefresh?: () => void; @@ -33,25 +50,6 @@ interface Props { /* Component ==================================================================== */ class EventsList extends PureComponent { - formatDate = (date: string) => { - const momentDate = moment(date); - const reference = moment(); - - if (momentDate.isSame(reference, 'day')) { - return Localize.t('global.today'); - } - if (momentDate.isSame(reference.subtract(1, 'days'), 'day')) { - return Localize.t('global.yesterday'); - } - - // same year, don't show year - if (momentDate.isSame(reference, 'year')) { - return momentDate.format('DD MMM'); - } - - return momentDate.format('DD MMM, Y'); - }; - renderListEmpty = () => { const { isLoading } = this.props; @@ -70,18 +68,38 @@ class EventsList extends PureComponent { ); }; - renderItem = ({ item }: { item: any }): React.ReactElement => { + renderSectionHeader = (data: string) => { + return ( + + {data} + + ); + }; + + renderItem = ({ item }: { item: DataSourceItem }): React.ReactElement => { const { account, timestamp } = this.props; - const passProps = { item, account, timestamp }; + const { data, type } = item; - switch (true) { - case item instanceof Payload: - return React.createElement(EventListItems.Request, passProps); - case item instanceof BaseTransaction: - return React.createElement(EventListItems.Transaction, passProps); - case item instanceof BaseLedgerObject: - return React.createElement(EventListItems.LedgerObject, passProps); + switch (type) { + case DataSourceItemType.SectionHeader: + return this.renderSectionHeader(data); + case DataSourceItemType.RowItem: { + const passProps = { item: data, account, timestamp }; + if (data instanceof Payload) { + // @ts-ignore + return React.createElement(EventListItems.Request, passProps); + } + if (data instanceof BaseTransaction) { + // @ts-ignore + return React.createElement(EventListItems.Transaction, passProps); + } + if (data instanceof BaseLedgerObject) { + // @ts-ignore + return React.createElement(EventListItems.LedgerObject, passProps); + } + return null; + } default: return null; } @@ -96,44 +114,62 @@ class EventsList extends PureComponent { return null; }; - renderSectionHeader = ({ section: { title, type } }: any) => { + renderRefreshControl = () => { + const { isLoading, onRefresh } = this.props; + return ( - - - {type === 'date' ? this.formatDate(title) : title} - - + ); }; + keyExtractor = ({ type }: DataSourceItem, index: number): string => { + switch (type) { + case DataSourceItemType.RowItem: + return `row-item-${index}`; + case DataSourceItemType.SectionHeader: + return `header-${index}`; + default: + return `item-${index}`; + } + }; + + // stickyHeaderIndices = () => { + // const { dataSource } = this.props; + // return dataSource + // .map((item, index) => { + // if (item.type === DataSourceItemType.SectionHeader) { + // return index; + // } + // return null; + // }) + // .filter((item) => item !== null) as number[]; + // }; + + getItemType = (item: DataSourceItem) => { + return item.type; + }; + render() { - const { isLoading, onRefresh, dataSource, onEndReached, headerComponent } = this.props; + const { dataSource, onEndReached, headerComponent } = this.props; return ( - item.Hash || item.meta?.uuid || item.Index} - ListEmptyComponent={this.renderListEmpty} - ListHeaderComponent={headerComponent} - onEndReached={onEndReached} - onEndReachedThreshold={0.2} - ListFooterComponent={this.renderFooter} - windowSize={10} - maxToRenderPerBatch={10} - initialNumToRender={20} - refreshControl={ - - } - indicatorStyle={StyleService.isDarkMode() ? 'white' : 'default'} - /> + + + ); } } diff --git a/src/components/Modules/EventsList/styles.ts b/src/components/Modules/EventsList/styles.ts index c96728644..a23ab5538 100644 --- a/src/components/Modules/EventsList/styles.ts +++ b/src/components/Modules/EventsList/styles.ts @@ -6,7 +6,6 @@ export default StyleService.create({ sectionList: { flex: 1, alignSelf: 'stretch', - backgroundColor: '$background', }, sectionListContainer: { paddingHorizontal: AppSizes.paddingList, diff --git a/src/screens/Events/EventsView.tsx b/src/screens/Events/EventsView.tsx index 058a60e60..e659ae39a 100644 --- a/src/screens/Events/EventsView.tsx +++ b/src/screens/Events/EventsView.tsx @@ -56,6 +56,8 @@ import { AppStateStatus } from '@services/AppService'; import { Button, Header, SearchBar, SegmentButton } from '@components/General'; import { EventsFilterChip, EventsList } from '@components/Modules'; +import { DataSourceItem, DataSourceItemType } from '@components/Modules/EventsList/EventsList'; + // Locale import Localize from '@locale'; @@ -80,7 +82,7 @@ export interface State { transactions: Array; plannedTransactions: Array; pendingRequests: Array; - dataSource: Array; + dataSource: Array; } enum DataSourceType { @@ -228,6 +230,25 @@ class EventsView extends Component { } }; + formatDate = (date: string) => { + const momentDate = moment(date); + const reference = moment(); + + if (momentDate.isSame(reference, 'day')) { + return Localize.t('global.today'); + } + if (momentDate.isSame(reference.subtract(1, 'days'), 'day')) { + return Localize.t('global.yesterday'); + } + + // same year, don't show year + if (momentDate.isSame(reference, 'year')) { + return momentDate.format('DD MMM'); + } + + return momentDate.format('DD MMM, Y'); + }; + fetchPlannedObjects = async ( account: string, type: string, @@ -368,7 +389,7 @@ class EventsView extends Component { } }; - buildDataSource = (transactions: any, pendingRequests: any, plannedTransactions?: any) => { + buildDataSource = (transactions: any, pendingRequests: any, plannedTransactions?: any): Array => { const { sectionIndex } = this.state; if (isEmpty(pendingRequests) && isEmpty(transactions) && isEmpty(plannedTransactions)) { @@ -378,7 +399,7 @@ class EventsView extends Component { let items = [] as any; if (sectionIndex === 1) { - const open = orderBy( + const openItems = orderBy( filter(plannedTransactions, (p) => [ LedgerObjectTypes.Offer, @@ -391,25 +412,25 @@ class EventsView extends Component { ['Date'], ); - const planned = orderBy(filter(plannedTransactions, { Type: LedgerObjectTypes.Escrow }), ['Date']); + const plannedItems = orderBy(filter(plannedTransactions, { Type: LedgerObjectTypes.Escrow }), ['Date']); const dataSource = []; - if (!isEmpty(open)) { - dataSource.push({ - title: 'Open', - type: 'string', - data: open, - }); + if (!isEmpty(openItems)) { + dataSource.push({ data: Localize.t('events.eventTypeOpen'), type: DataSourceItemType.SectionHeader }); + map(openItems, (item) => dataSource.push({ data: item, type: DataSourceItemType.RowItem })); } - if (!isEmpty(planned)) { - dataSource.push({ title: Localize.t('events.plannedOn'), type: 'string', data: [] }); - const grouped = groupBy(planned, (item) => { + if (!isEmpty(plannedItems)) { + dataSource.push({ data: Localize.t('events.plannedOn'), type: DataSourceItemType.SectionHeader }); + const grouped = groupBy(plannedItems, (item) => { return moment(item.Date).format('YYYY-MM-DD'); }); map(grouped, (v, k) => { - dataSource.push({ title: k, data: v, type: 'date' }); + dataSource.push({ data: this.formatDate(k), type: DataSourceItemType.SectionHeader }); + map(v, (item) => { + dataSource.push({ data: item, type: DataSourceItemType.RowItem }); + }); }); } @@ -424,14 +445,18 @@ class EventsView extends Component { // group items by month name and then get the name for each month const grouped = groupBy(items, (item) => moment(item.Date).format('YYYY-MM-DD')); - const dataSource = [] as any; + const dataSource: DataSourceItem[] = []; map(grouped, (v, k) => { - dataSource.push({ title: k, data: v, type: 'date' }); + dataSource.push({ data: this.formatDate(k), type: DataSourceItemType.SectionHeader }); + map(v, (item) => { + dataSource.push({ data: item, type: DataSourceItemType.RowItem }); + }); }); + return dataSource; // sort by date - return orderBy(dataSource, ['title'], ['desc']); + // const sorted = orderBy(dataSource, ['title'], ['desc']); }; updateDataSource = async (include?: DataSourceType[]) => { @@ -785,13 +810,13 @@ class EventsView extends Component { imageStyle={AppStyles.BackgroundShapes} style={[AppStyles.contentContainer, AppStyles.padding]} > - - {Localize.t('events.emptyEventsNoAccount')} + + {Localize.t('events.emptyEventsNoAccount')}