@stellar-expert/ui-framework 1.9.11 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
- import {parseStellarGenericId} from '../stellar/ledger-generic-id'
2
- import {getCurrentStellarNetwork} from '../state/stellar-network-hooks'
3
- import {fetchExplorerApi} from './explorer-api-call'
4
-
5
- /**
6
- * Load transaction from API
7
- * @param {String} txHashOrId - Transaction hash or generic id
8
- * @return {Promise<Object>}
9
- */
10
- export function loadTransaction(txHashOrId) {
11
- if (/^\d+$/.test(txHashOrId)) { //treat as generic tx id
12
- const {type} = parseStellarGenericId(txHashOrId)
13
- if (type !== 'transaction')
14
- return Promise.reject(new Error('Invalid transaction id: ' + txHashOrId))
15
- } else if (!/^[a-fA-F0-9]{64}$/.test(txHashOrId))
16
- return Promise.reject(new Error('Invalid transaction hash or id: ' + txHashOrId))
17
-
18
- return fetchExplorerApi(getCurrentStellarNetwork() + '/tx/' + txHashOrId)
19
- }
20
-
21
-
22
- /**
23
- * Load transactions included into the ledger
24
- * @param {Number} sequence - Ledger sequence
25
- * @return {Promise<Array<Object>>}
26
- */
27
- export function loadLedgerTransactions(sequence) {
28
- return fetchExplorerApi(getCurrentStellarNetwork() + '/ledger/' + sequence + '/tx')
1
+ import {parseStellarGenericId} from '../stellar/ledger-generic-id'
2
+ import {getCurrentStellarNetwork} from '../state/stellar-network-hooks'
3
+ import {fetchExplorerApi} from './explorer-api-call'
4
+
5
+ /**
6
+ * Load transaction from API
7
+ * @param {String} txHashOrId - Transaction hash or generic id
8
+ * @return {Promise<Object>}
9
+ */
10
+ export function loadTransaction(txHashOrId) {
11
+ if (/^\d+$/.test(txHashOrId)) { //treat as generic tx id
12
+ const {type} = parseStellarGenericId(txHashOrId)
13
+ if (type !== 'transaction')
14
+ return Promise.reject(new Error('Invalid transaction id: ' + txHashOrId))
15
+ } else if (!/^[a-fA-F0-9]{64}$/.test(txHashOrId))
16
+ return Promise.reject(new Error('Invalid transaction hash or id: ' + txHashOrId))
17
+
18
+ return fetchExplorerApi(getCurrentStellarNetwork() + '/tx/' + txHashOrId)
19
+ }
20
+
21
+
22
+ /**
23
+ * Load transactions included into the ledger
24
+ * @param {Number} sequence - Ledger sequence
25
+ * @return {Promise<Array<Object>>}
26
+ */
27
+ export function loadLedgerTransactions(sequence) {
28
+ return fetchExplorerApi(getCurrentStellarNetwork() + '/ledger/' + sequence + '/tx')
29
29
  }
@@ -1,3 +1,3 @@
1
- .sc-val {
2
- line-height: 1;
1
+ .sc-val {
2
+ line-height: 1;
3
3
  }