@stellar-expert/ui-framework 1.21.1 → 1.21.3
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.
- package/account/account-address.js +6 -6
- package/account/signer-key.js +1 -1
- package/api/explorer-api-hooks.js +4 -4
- package/api/explorer-api-paginated-list-hooks.js +4 -4
- package/api/explorer-tx-api.js +3 -3
- package/api/ledger-stream.js +2 -2
- package/asset/amount.js +2 -2
- package/asset/asset-icon.js +2 -2
- package/asset/asset-issuer.js +2 -2
- package/asset/asset-link.js +6 -6
- package/asset/asset-list-hooks.js +3 -3
- package/asset/asset-meta-hooks.js +3 -3
- package/asset/asset-selector.js +3 -3
- package/charts/axis/axis.js +24 -4
- package/charts/axis/tick-positioner.js +1 -1
- package/charts/chart-default-options.js +1 -1
- package/charts/chart-options-builder.js +2 -2
- package/charts/chart.js +5 -5
- package/charts/core/animate.js +1 -1
- package/charts/core/chart.js +25 -15
- package/charts/core/options.js +1 -1
- package/charts/globals.js +5 -5
- package/charts/index.js +2 -2
- package/charts/interaction/tooltip.js +2 -2
- package/charts/pie/pie-chart.js +2 -2
- package/charts/polar/polar-chart.js +2 -2
- package/charts/series/area-series.js +3 -3
- package/charts/series/candlestick-series.js +3 -3
- package/charts/series/column-series.js +3 -3
- package/charts/series/index.js +4 -4
- package/charts/series/line-series.js +3 -3
- package/charts/series/series.js +1 -1
- package/charts/stock/data-grouping.js +1 -1
- package/charts/stock/navigator.js +33 -5
- package/charts/stock/range-selector.js +25 -3
- package/claimable-balance/claimable-balance-claimants.js +2 -2
- package/claimable-balance/claimable-balance-id.js +1 -1
- package/contract/contract-api.js +2 -2
- package/contract/invocation-info-view.js +6 -6
- package/contract/sc-val.js +1 -1
- package/controls/dropdown.js +1 -1
- package/controls/info-tooltip.js +1 -1
- package/controls/tabs.js +1 -1
- package/controls/update-highlighter.js +1 -1
- package/date/utc-timestamp.js +28 -28
- package/directory/directory-hooks.js +2 -2
- package/effect/effect-description.js +9 -9
- package/effect/op-effects-view.js +57 -57
- package/errors/error-boundary.js +1 -1
- package/filter/editors/account-filter-view.js +2 -2
- package/filter/editors/asset-filter-view.js +2 -2
- package/filter/editors/timestamp-filter-view.js +3 -3
- package/filter/editors/type-filter-view.js +1 -1
- package/filter/filter-editors.js +6 -6
- package/filter/filter-view.js +2 -2
- package/horizon/horizon-account-helpers.js +1 -1
- package/horizon/horizon-ledger-helpers.js +1 -1
- package/horizon/horizon-orderbook-helpers.js +14 -14
- package/horizon/horizon-trades-helper.js +1 -1
- package/horizon/horizon-transaction-helpers.js +1 -1
- package/index.js +73 -73
- package/interaction/system-dialog.js +2 -2
- package/interaction/theme-selector.js +1 -1
- package/ledger/ledger-entry-href-formatter.js +1 -1
- package/ledger/ledger-entry-link.js +2 -2
- package/module/dynamic-module.js +1 -1
- package/package.json +2 -3
- package/state/page-visibility-hooks.js +1 -1
- package/toast/toast-notifications-block.js +2 -2
- package/tx/op-accounting-changes.js +26 -26
- package/tx/op-description-view.js +13 -13
- package/tx/parser/tx-details-parser.js +2 -2
- package/tx/parser/tx-matcher.js +1 -1
- package/tx/tx-fee-effect.js +13 -13
- package/tx/tx-list-hooks.js +2 -2
- package/tx/tx-operations-list.js +6 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {parseContractMetadata} from '@stellar-expert/contract-wasm-interface-parser'
|
|
3
3
|
import {shortenString} from '@stellar-expert/formatter'
|
|
4
|
-
import {AccountAddress} from '../account/account-address
|
|
5
|
-
import {AssetLink} from '../asset/asset-link
|
|
6
|
-
import {Tooltip} from '../controls/tooltip
|
|
7
|
-
import {parseScValValue, primitiveTypes, ScVal, ScValStruct} from './sc-val
|
|
8
|
-
import {useContractSource} from './contract-api
|
|
9
|
-
import {sacInterface} from './sac-interface
|
|
4
|
+
import {AccountAddress} from '../account/account-address'
|
|
5
|
+
import {AssetLink} from '../asset/asset-link'
|
|
6
|
+
import {Tooltip} from '../controls/tooltip'
|
|
7
|
+
import {parseScValValue, primitiveTypes, ScVal, ScValStruct} from './sc-val'
|
|
8
|
+
import {useContractSource} from './contract-api'
|
|
9
|
+
import {sacInterface} from './sac-interface'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Basic Soroban contract invocation info
|
package/contract/sc-val.js
CHANGED
|
@@ -3,7 +3,7 @@ import cn from 'classnames'
|
|
|
3
3
|
import {xdr, scValToBigInt} from '@stellar/stellar-sdk'
|
|
4
4
|
import {xdrParserUtils} from '@stellar-expert/tx-meta-effects-parser'
|
|
5
5
|
import {shortenString} from '@stellar-expert/formatter'
|
|
6
|
-
import {AccountAddress} from '../account/account-address
|
|
6
|
+
import {AccountAddress} from '../account/account-address'
|
|
7
7
|
import './sc-val.scss'
|
|
8
8
|
|
|
9
9
|
/**
|
package/controls/dropdown.js
CHANGED
|
@@ -3,7 +3,7 @@ import {createPortal} from 'react-dom'
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import cn from 'classnames'
|
|
5
5
|
import {throttle} from 'throttle-debounce'
|
|
6
|
-
import {useDependantState} from '../state/state-hooks
|
|
6
|
+
import {useDependantState} from '../state/state-hooks'
|
|
7
7
|
import './dropdown.scss'
|
|
8
8
|
|
|
9
9
|
/**
|
package/controls/info-tooltip.js
CHANGED
package/controls/tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useEffect} from 'react'
|
|
2
2
|
import cn from 'classnames'
|
|
3
3
|
import {navigation} from '@stellar-expert/navigation'
|
|
4
|
-
import {useDependantState} from '../state/state-hooks
|
|
4
|
+
import {useDependantState} from '../state/state-hooks'
|
|
5
5
|
import './tabs.scss'
|
|
6
6
|
|
|
7
7
|
/**
|
package/date/utc-timestamp.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import cn from 'classnames'
|
|
4
|
-
import {normalizeDate, formatDateUTC} from '@stellar-expert/formatter'
|
|
5
|
-
import {BlockSelect} from '../interaction/block-select
|
|
6
|
-
|
|
7
|
-
export const UtcTimestamp = React.memo(function UtcTimestamp({date, dateOnly, className}) {
|
|
8
|
-
let formatted
|
|
9
|
-
try {
|
|
10
|
-
date = normalizeDate(date)
|
|
11
|
-
formatted = formatDateUTC(date)
|
|
12
|
-
if (dateOnly) {
|
|
13
|
-
formatted = formatted.split(' ')[0]
|
|
14
|
-
} else {
|
|
15
|
-
formatted += ' UTC'
|
|
16
|
-
}
|
|
17
|
-
} catch (e) {
|
|
18
|
-
console.error(e)
|
|
19
|
-
return null
|
|
20
|
-
}
|
|
21
|
-
const localTime = date.toString().replace(/ \(.+\)/, '').replace(/\w+ /, '')
|
|
22
|
-
return <BlockSelect className={cn('condensed nowrap', className)} title={localTime}>{formatted}</BlockSelect>
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
UtcTimestamp.propTypes = {
|
|
26
|
-
date: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]).isRequired,
|
|
27
|
-
dateOnly: PropTypes.bool,
|
|
28
|
-
className: PropTypes.string
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import cn from 'classnames'
|
|
4
|
+
import {normalizeDate, formatDateUTC} from '@stellar-expert/formatter'
|
|
5
|
+
import {BlockSelect} from '../interaction/block-select'
|
|
6
|
+
|
|
7
|
+
export const UtcTimestamp = React.memo(function UtcTimestamp({date, dateOnly, className}) {
|
|
8
|
+
let formatted
|
|
9
|
+
try {
|
|
10
|
+
date = normalizeDate(date)
|
|
11
|
+
formatted = formatDateUTC(date)
|
|
12
|
+
if (dateOnly) {
|
|
13
|
+
formatted = formatted.split(' ')[0]
|
|
14
|
+
} else {
|
|
15
|
+
formatted += ' UTC'
|
|
16
|
+
}
|
|
17
|
+
} catch (e) {
|
|
18
|
+
console.error(e)
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
const localTime = date.toString().replace(/ \(.+\)/, '').replace(/\w+ /, '')
|
|
22
|
+
return <BlockSelect className={cn('condensed nowrap', className)} title={localTime}>{formatted}</BlockSelect>
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
UtcTimestamp.propTypes = {
|
|
26
|
+
date: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]).isRequired,
|
|
27
|
+
dateOnly: PropTypes.bool,
|
|
28
|
+
className: PropTypes.string
|
|
29
29
|
}
|
|
@@ -2,8 +2,8 @@ import {useEffect, useState} from 'react'
|
|
|
2
2
|
import {StrKey} from '@stellar/stellar-sdk'
|
|
3
3
|
import {stringifyQuery} from '@stellar-expert/navigation'
|
|
4
4
|
import {InMemoryClientCache} from '@stellar-expert/client-cache'
|
|
5
|
-
import {fetchExplorerApi} from '../api/explorer-api-call
|
|
6
|
-
import {ExplorerBatchInfoLoader} from '../api/explorer-batch-info-loader
|
|
5
|
+
import {fetchExplorerApi} from '../api/explorer-api-call'
|
|
6
|
+
import {ExplorerBatchInfoLoader} from '../api/explorer-batch-info-loader'
|
|
7
7
|
|
|
8
8
|
const cache = new InMemoryClientCache({})
|
|
9
9
|
|
|
@@ -3,15 +3,15 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import {AuthRequiredFlag, AuthRevocableFlag, AuthImmutableFlag, AuthClawbackEnabledFlag} from '@stellar/stellar-sdk'
|
|
4
4
|
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
5
5
|
import {shortenString, formatWithAutoPrecision} from '@stellar-expert/formatter'
|
|
6
|
-
import {CopyToClipboard} from '../interaction/copy-to-clipboard
|
|
7
|
-
import {AccountAddress} from '../account/account-address
|
|
8
|
-
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id
|
|
9
|
-
import InvocationInfoView from '../contract/invocation-info-view
|
|
10
|
-
import {ScVal} from '../contract/sc-val
|
|
11
|
-
import {SignerKey} from '../account/signer-key
|
|
12
|
-
import {OfferLink} from '../ledger/ledger-entry-link
|
|
13
|
-
import {AssetLink} from '../asset/asset-link
|
|
14
|
-
import {Amount} from '../asset/amount
|
|
6
|
+
import {CopyToClipboard} from '../interaction/copy-to-clipboard'
|
|
7
|
+
import {AccountAddress} from '../account/account-address'
|
|
8
|
+
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id'
|
|
9
|
+
import InvocationInfoView from '../contract/invocation-info-view'
|
|
10
|
+
import {ScVal} from '../contract/sc-val'
|
|
11
|
+
import {SignerKey} from '../account/signer-key'
|
|
12
|
+
import {OfferLink} from '../ledger/ledger-entry-link'
|
|
13
|
+
import {AssetLink} from '../asset/asset-link'
|
|
14
|
+
import {Amount} from '../asset/amount'
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Renders a human-readable description of a Stellar transaction effect
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import cn from 'classnames'
|
|
3
|
-
import {EffectDescription} from './effect-description
|
|
4
|
-
import SorobanTxMetricsView from './soroban-tx-metrics-view
|
|
5
|
-
import './op-effects.scss'
|
|
6
|
-
|
|
7
|
-
export function OpEffectsView({operation}) {
|
|
8
|
-
const effects = getEffects(operation)
|
|
9
|
-
if (!effects.length)
|
|
10
|
-
return <div className="op-effects">
|
|
11
|
-
<div className="dimmed">(no effects)</div>
|
|
12
|
-
</div>
|
|
13
|
-
return <div className="op-effects">
|
|
14
|
-
{effects.map((e, i) => {
|
|
15
|
-
if (e.type === 'contractMetrics')
|
|
16
|
-
return null
|
|
17
|
-
return <div key={i}>
|
|
18
|
-
<i className={cn('effect-icon', e.type === 'contractError' ? 'icon-warning' : 'icon-puzzle')}/> 
|
|
19
|
-
<EffectDescription effect={e} operation={operation}/>
|
|
20
|
-
</div>
|
|
21
|
-
})}
|
|
22
|
-
<SorobanTxMetricsView metrics={effects.find(e => e.type === 'contractMetrics')}/>
|
|
23
|
-
</div>
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function getEffects(op) {
|
|
27
|
-
let {effects} = op.operation
|
|
28
|
-
if (op.operation.type === 'invokeHostFunction')
|
|
29
|
-
return sortContractEffects([...effects])
|
|
30
|
-
return effects
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function sortContractEffects(effects) {
|
|
34
|
-
effects.sort((a, b) => {
|
|
35
|
-
const aInvocation = a.type === 'contractInvoked'
|
|
36
|
-
const bInvocation = b.type === 'contractInvoked'
|
|
37
|
-
if (aInvocation && bInvocation)
|
|
38
|
-
return 0
|
|
39
|
-
if (!aInvocation && !bInvocation) {
|
|
40
|
-
const aData = a.type === 'setTtl' || a.type.startsWith('contractData')
|
|
41
|
-
const bData = b.type === 'setTtl' || b.type.startsWith('contractData')
|
|
42
|
-
if (aData === bData) {
|
|
43
|
-
if (a.type === 'setTtl')
|
|
44
|
-
return 1
|
|
45
|
-
if (b.type === 'setTtl')
|
|
46
|
-
return -1
|
|
47
|
-
if (a.durability === 'instance' && a.durability !== b.durability)
|
|
48
|
-
return -1
|
|
49
|
-
if (b.durability === 'instance' && a.durability !== b.durability)
|
|
50
|
-
return 1
|
|
51
|
-
return 0
|
|
52
|
-
}
|
|
53
|
-
return aData ? 1 : -1
|
|
54
|
-
}
|
|
55
|
-
return aInvocation ? -1 : 1
|
|
56
|
-
})
|
|
57
|
-
return effects
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import {EffectDescription} from './effect-description'
|
|
4
|
+
import SorobanTxMetricsView from './soroban-tx-metrics-view'
|
|
5
|
+
import './op-effects.scss'
|
|
6
|
+
|
|
7
|
+
export function OpEffectsView({operation}) {
|
|
8
|
+
const effects = getEffects(operation)
|
|
9
|
+
if (!effects.length)
|
|
10
|
+
return <div className="op-effects">
|
|
11
|
+
<div className="dimmed">(no effects)</div>
|
|
12
|
+
</div>
|
|
13
|
+
return <div className="op-effects">
|
|
14
|
+
{effects.map((e, i) => {
|
|
15
|
+
if (e.type === 'contractMetrics')
|
|
16
|
+
return null
|
|
17
|
+
return <div key={i}>
|
|
18
|
+
<i className={cn('effect-icon', e.type === 'contractError' ? 'icon-warning' : 'icon-puzzle')}/> 
|
|
19
|
+
<EffectDescription effect={e} operation={operation}/>
|
|
20
|
+
</div>
|
|
21
|
+
})}
|
|
22
|
+
<SorobanTxMetricsView metrics={effects.find(e => e.type === 'contractMetrics')}/>
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getEffects(op) {
|
|
27
|
+
let {effects} = op.operation
|
|
28
|
+
if (op.operation.type === 'invokeHostFunction')
|
|
29
|
+
return sortContractEffects([...effects])
|
|
30
|
+
return effects
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function sortContractEffects(effects) {
|
|
34
|
+
effects.sort((a, b) => {
|
|
35
|
+
const aInvocation = a.type === 'contractInvoked'
|
|
36
|
+
const bInvocation = b.type === 'contractInvoked'
|
|
37
|
+
if (aInvocation && bInvocation)
|
|
38
|
+
return 0
|
|
39
|
+
if (!aInvocation && !bInvocation) {
|
|
40
|
+
const aData = a.type === 'setTtl' || a.type.startsWith('contractData')
|
|
41
|
+
const bData = b.type === 'setTtl' || b.type.startsWith('contractData')
|
|
42
|
+
if (aData === bData) {
|
|
43
|
+
if (a.type === 'setTtl')
|
|
44
|
+
return 1
|
|
45
|
+
if (b.type === 'setTtl')
|
|
46
|
+
return -1
|
|
47
|
+
if (a.durability === 'instance' && a.durability !== b.durability)
|
|
48
|
+
return -1
|
|
49
|
+
if (b.durability === 'instance' && a.durability !== b.durability)
|
|
50
|
+
return 1
|
|
51
|
+
return 0
|
|
52
|
+
}
|
|
53
|
+
return aData ? 1 : -1
|
|
54
|
+
}
|
|
55
|
+
return aInvocation ? -1 : 1
|
|
56
|
+
})
|
|
57
|
+
return effects
|
|
58
58
|
}
|
package/errors/error-boundary.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import {navigation as nav} from '@stellar-expert/navigation'
|
|
4
|
-
import {BlockSelect} from '../interaction/block-select
|
|
4
|
+
import {BlockSelect} from '../interaction/block-select'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* React error boundary that catches rendering errors and displays a fallback UI
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
2
|
import {StrKey} from '@stellar/stellar-sdk'
|
|
3
|
-
import {AccountAddress} from '../../account/account-address
|
|
4
|
-
import {useAutoFocusRef} from '../../interaction/autofocus
|
|
3
|
+
import {AccountAddress} from '../../account/account-address'
|
|
4
|
+
import {useAutoFocusRef} from '../../interaction/autofocus'
|
|
5
5
|
|
|
6
6
|
export function AccountEditor({value, setValue}) {
|
|
7
7
|
const [internalValue, setInternalValue] = useState(value || '')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {AssetLink} from '../../asset/asset-link
|
|
3
|
-
import {AssetSelector} from '../../asset/asset-selector
|
|
2
|
+
import {AssetLink} from '../../asset/asset-link'
|
|
3
|
+
import {AssetSelector} from '../../asset/asset-selector'
|
|
4
4
|
|
|
5
5
|
export function AssetEditor({value, setValue}) {
|
|
6
6
|
if (!setValue)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
|
-
import {UtcTimestamp} from '../../date/utc-timestamp
|
|
3
|
-
import {DateSelector} from '../../date/date-selector
|
|
4
|
-
import {useAutoFocusRef} from '../../interaction/autofocus
|
|
2
|
+
import {UtcTimestamp} from '../../date/utc-timestamp'
|
|
3
|
+
import {DateSelector} from '../../date/date-selector'
|
|
4
|
+
import {useAutoFocusRef} from '../../interaction/autofocus'
|
|
5
5
|
|
|
6
6
|
export function TimestampEditor({value, setValue, edit}) {
|
|
7
7
|
value = parseInt(value, 10)
|
package/filter/filter-editors.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
2
|
import {StrKey} from '@stellar/stellar-sdk'
|
|
3
3
|
import {shortenString} from '@stellar-expert/formatter'
|
|
4
|
-
import {AssetLink} from '../asset/asset-link
|
|
5
|
-
import {useAutoFocusRef} from '../interaction/autofocus
|
|
6
|
-
import {OperationTypeEditor} from './editors/type-filter-view
|
|
7
|
-
import {AssetEditor} from './editors/asset-filter-view
|
|
8
|
-
import {AccountEditor} from './editors/account-filter-view
|
|
9
|
-
import {TimestampEditor} from './editors/timestamp-filter-view
|
|
4
|
+
import {AssetLink} from '../asset/asset-link'
|
|
5
|
+
import {useAutoFocusRef} from '../interaction/autofocus'
|
|
6
|
+
import {OperationTypeEditor} from './editors/type-filter-view'
|
|
7
|
+
import {AssetEditor} from './editors/asset-filter-view'
|
|
8
|
+
import {AccountEditor} from './editors/account-filter-view'
|
|
9
|
+
import {TimestampEditor} from './editors/timestamp-filter-view'
|
|
10
10
|
|
|
11
11
|
export function TextEditor({value, setValue, mask}) {
|
|
12
12
|
const [internalValue, setInternalValue] = useState(value || '')
|
package/filter/filter-view.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, {useCallback, useEffect, useState} from 'react'
|
|
2
2
|
import {navigation, parseQuery} from '@stellar-expert/navigation'
|
|
3
3
|
import deepmerge from 'deepmerge'
|
|
4
|
-
import {Dropdown} from '../controls/dropdown
|
|
5
|
-
import {resolveFilterEditor} from './filter-editors
|
|
4
|
+
import {Dropdown} from '../controls/dropdown'
|
|
5
|
+
import {resolveFilterEditor} from './filter-editors'
|
|
6
6
|
import './filter.scss'
|
|
7
7
|
|
|
8
8
|
let fieldDescriptionMapping = {}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
-
import {applyListQueryParameters, initHorizon} from './horizon-client-helpers
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Load orderbook for assets.
|
|
6
|
-
* @param {object} selling - Selling asset.
|
|
7
|
-
* @param {object} buying - Buying asset.
|
|
8
|
-
* @param {ListQueryParams} [queryParams] - Query parameters (optional).
|
|
9
|
-
* @return {Promise<Array<object>>}
|
|
10
|
-
*/
|
|
11
|
-
export function loadOrderbook(selling, buying, queryParams = null) {
|
|
12
|
-
const query = applyListQueryParameters(initHorizon().orderbook(AssetDescriptor.parse(selling).toAsset(), AssetDescriptor.parse(buying).toAsset()), queryParams)
|
|
13
|
-
return query.call()
|
|
14
|
-
}
|
|
1
|
+
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
+
import {applyListQueryParameters, initHorizon} from './horizon-client-helpers'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Load orderbook for assets.
|
|
6
|
+
* @param {object} selling - Selling asset.
|
|
7
|
+
* @param {object} buying - Buying asset.
|
|
8
|
+
* @param {ListQueryParams} [queryParams] - Query parameters (optional).
|
|
9
|
+
* @return {Promise<Array<object>>}
|
|
10
|
+
*/
|
|
11
|
+
export function loadOrderbook(selling, buying, queryParams = null) {
|
|
12
|
+
const query = applyListQueryParameters(initHorizon().orderbook(AssetDescriptor.parse(selling).toAsset(), AssetDescriptor.parse(buying).toAsset()), queryParams)
|
|
13
|
+
return query.call()
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
-
import {initHorizon, applyListQueryParameters} from './horizon-client-helpers
|
|
2
|
+
import {initHorizon, applyListQueryParameters} from './horizon-client-helpers'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Load offer from Horizon for the particular account
|
package/index.js
CHANGED
|
@@ -5,93 +5,93 @@ window.explorerApiOrigin = window.explorerApiOrigin || 'https://api.stellar.expe
|
|
|
5
5
|
window.horizonOrigin = window.horizonOrigin || 'https://horizon.stellar.org'
|
|
6
6
|
|
|
7
7
|
//modules
|
|
8
|
-
export * from './module/dynamic-module
|
|
8
|
+
export * from './module/dynamic-module'
|
|
9
9
|
//state management and utils
|
|
10
|
-
export * from './state/state-hooks
|
|
11
|
-
export * from './state/on-screen-hooks
|
|
12
|
-
export * from './state/stellar-network-hooks
|
|
13
|
-
export * from './state/screen-orientation-hooks
|
|
14
|
-
export * from './state/page-visibility-helpers
|
|
15
|
-
export * from './state/theme
|
|
16
|
-
export * from './meta/page-meta-tags
|
|
10
|
+
export * from './state/state-hooks'
|
|
11
|
+
export * from './state/on-screen-hooks'
|
|
12
|
+
export * from './state/stellar-network-hooks'
|
|
13
|
+
export * from './state/screen-orientation-hooks'
|
|
14
|
+
export * from './state/page-visibility-helpers'
|
|
15
|
+
export * from './state/theme'
|
|
16
|
+
export * from './meta/page-meta-tags'
|
|
17
17
|
//explorer API bindings
|
|
18
|
-
export * from './api/explorer-api-hooks
|
|
19
|
-
export * from './api/explorer-api-paginated-list-hooks
|
|
20
|
-
export * from './api/explorer-tx-api
|
|
21
|
-
export * from './api/explorer-batch-info-loader
|
|
22
|
-
export * from './api/ledger-stream
|
|
18
|
+
export * from './api/explorer-api-hooks'
|
|
19
|
+
export * from './api/explorer-api-paginated-list-hooks'
|
|
20
|
+
export * from './api/explorer-tx-api'
|
|
21
|
+
export * from './api/explorer-batch-info-loader'
|
|
22
|
+
export * from './api/ledger-stream'
|
|
23
23
|
//Horizon API binding and utils
|
|
24
|
-
export * from './stellar/ledger-generic-id
|
|
25
|
-
export * from './horizon/horizon-client-helpers
|
|
26
|
-
export * from './horizon/horizon-ledger-helpers
|
|
27
|
-
export * from './horizon/horizon-transaction-helpers
|
|
28
|
-
export * from './horizon/horizon-account-helpers
|
|
29
|
-
export * from './horizon/horizon-orderbook-helpers
|
|
30
|
-
export * from './horizon/horizon-trades-helper
|
|
24
|
+
export * from './stellar/ledger-generic-id'
|
|
25
|
+
export * from './horizon/horizon-client-helpers'
|
|
26
|
+
export * from './horizon/horizon-ledger-helpers'
|
|
27
|
+
export * from './horizon/horizon-transaction-helpers'
|
|
28
|
+
export * from './horizon/horizon-account-helpers'
|
|
29
|
+
export * from './horizon/horizon-orderbook-helpers'
|
|
30
|
+
export * from './horizon/horizon-trades-helper'
|
|
31
31
|
//basic UI controls
|
|
32
|
-
export * from './controls/button
|
|
33
|
-
export * from './controls/button-group
|
|
34
|
-
export * from './controls/info-tooltip
|
|
35
|
-
export * from './controls/tooltip
|
|
36
|
-
export * from './controls/update-highlighter
|
|
37
|
-
export * from './controls/tabs
|
|
38
|
-
export * from './controls/dropdown
|
|
39
|
-
export * from './controls/code-block
|
|
40
|
-
export * from './controls/slider
|
|
41
|
-
export * from './controls/external-link
|
|
42
|
-
export * from './toast/toast-notifications-block
|
|
43
|
-
export * from './errors/error-boundary
|
|
32
|
+
export * from './controls/button'
|
|
33
|
+
export * from './controls/button-group'
|
|
34
|
+
export * from './controls/info-tooltip'
|
|
35
|
+
export * from './controls/tooltip'
|
|
36
|
+
export * from './controls/update-highlighter'
|
|
37
|
+
export * from './controls/tabs'
|
|
38
|
+
export * from './controls/dropdown'
|
|
39
|
+
export * from './controls/code-block'
|
|
40
|
+
export * from './controls/slider'
|
|
41
|
+
export * from './controls/external-link'
|
|
42
|
+
export * from './toast/toast-notifications-block'
|
|
43
|
+
export * from './errors/error-boundary'
|
|
44
44
|
//interaction
|
|
45
|
-
export * from './interaction/autofocus
|
|
46
|
-
export * from './interaction/block-select
|
|
47
|
-
export * from './interaction/copy-to-clipboard
|
|
48
|
-
export * from './interaction/spoiler
|
|
49
|
-
export * from './interaction/accordion
|
|
50
|
-
export * from './interaction/theme-selector
|
|
51
|
-
export * from './interaction/inline-progress
|
|
52
|
-
export * from './interaction/responsive
|
|
53
|
-
export * from './interaction/qr-code
|
|
54
|
-
export * from './interaction/dialog
|
|
55
|
-
export * from './interaction/system-dialog
|
|
45
|
+
export * from './interaction/autofocus'
|
|
46
|
+
export * from './interaction/block-select'
|
|
47
|
+
export * from './interaction/copy-to-clipboard'
|
|
48
|
+
export * from './interaction/spoiler'
|
|
49
|
+
export * from './interaction/accordion'
|
|
50
|
+
export * from './interaction/theme-selector'
|
|
51
|
+
export * from './interaction/inline-progress'
|
|
52
|
+
export * from './interaction/responsive'
|
|
53
|
+
export * from './interaction/qr-code'
|
|
54
|
+
export * from './interaction/dialog'
|
|
55
|
+
export * from './interaction/system-dialog'
|
|
56
56
|
//date components
|
|
57
|
-
export * from './date/utc-timestamp
|
|
58
|
-
export * from './date/elapsed-time
|
|
59
|
-
export * from './date/date-selector
|
|
57
|
+
export * from './date/utc-timestamp'
|
|
58
|
+
export * from './date/elapsed-time'
|
|
59
|
+
export * from './date/date-selector'
|
|
60
60
|
//ledger-entries-related components
|
|
61
|
-
export * from './ledger/ledger-entry-link
|
|
62
|
-
export * from './ledger/ledger-entry-href-formatter
|
|
63
|
-
export * from './ledger/ledger-info-parser
|
|
61
|
+
export * from './ledger/ledger-entry-link'
|
|
62
|
+
export * from './ledger/ledger-entry-href-formatter'
|
|
63
|
+
export * from './ledger/ledger-info-parser'
|
|
64
64
|
//account-related components
|
|
65
|
-
export * from './account/identicon
|
|
66
|
-
export * from './account/account-address
|
|
67
|
-
export * from './account/signer-key
|
|
68
|
-
export * from './account/available-balance
|
|
65
|
+
export * from './account/identicon'
|
|
66
|
+
export * from './account/account-address'
|
|
67
|
+
export * from './account/signer-key'
|
|
68
|
+
export * from './account/available-balance'
|
|
69
69
|
//asset-related components
|
|
70
|
-
export * from './asset/asset-link
|
|
71
|
-
export * from './asset/asset-issuer
|
|
72
|
-
export * from './asset/asset-icon
|
|
73
|
-
export * from './asset/asset-selector
|
|
74
|
-
export * from './asset/amount
|
|
75
|
-
export * from './asset/asset-meta-hooks
|
|
76
|
-
export * from './asset/asset-list-hooks
|
|
70
|
+
export * from './asset/asset-link'
|
|
71
|
+
export * from './asset/asset-issuer'
|
|
72
|
+
export * from './asset/asset-icon'
|
|
73
|
+
export * from './asset/asset-selector'
|
|
74
|
+
export * from './asset/amount'
|
|
75
|
+
export * from './asset/asset-meta-hooks'
|
|
76
|
+
export * from './asset/asset-list-hooks'
|
|
77
77
|
//claimable-balance-related components
|
|
78
|
-
export * from './claimable-balance/claimable-balance-claimants
|
|
78
|
+
export * from './claimable-balance/claimable-balance-claimants'
|
|
79
79
|
//DEX-related components
|
|
80
|
-
export * from './dex/price-dynamic
|
|
80
|
+
export * from './dex/price-dynamic'
|
|
81
81
|
//directory-related components
|
|
82
|
-
export * from './directory/directory-hooks
|
|
82
|
+
export * from './directory/directory-hooks'
|
|
83
83
|
//transaction/operation/effects components
|
|
84
|
-
export * from './tx/tx-operations-list
|
|
85
|
-
export * from './tx/parser/tx-details-parser
|
|
86
|
-
export * from './tx/tx-list-hooks
|
|
87
|
-
export * from './effect/effect-description
|
|
84
|
+
export * from './tx/tx-operations-list'
|
|
85
|
+
export * from './tx/parser/tx-details-parser'
|
|
86
|
+
export * from './tx/tx-list-hooks'
|
|
87
|
+
export * from './effect/effect-description'
|
|
88
88
|
//contract-related components
|
|
89
|
-
export * from './contract/contract-api
|
|
89
|
+
export * from './contract/contract-api'
|
|
90
90
|
//filter component
|
|
91
|
-
export * from './filter/filter-view
|
|
91
|
+
export * from './filter/filter-view'
|
|
92
92
|
//Stellar-specific utils
|
|
93
|
-
export * from './stellar/key-type
|
|
94
|
-
export * from './stellar/signature-hint-utils
|
|
95
|
-
export * from './contract/sc-val
|
|
93
|
+
export * from './stellar/key-type'
|
|
94
|
+
export * from './stellar/signature-hint-utils'
|
|
95
|
+
export * from './contract/sc-val'
|
|
96
96
|
//charts
|
|
97
|
-
export {default as Chart, ChartEngine, ChartLoader} from './charts
|
|
97
|
+
export {default as Chart, ChartEngine, ChartLoader} from './charts'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {useEffect, useState} from 'react'
|
|
2
|
-
import {Button} from '../controls/button
|
|
3
|
-
import {Dialog} from './dialog
|
|
2
|
+
import {Button} from '../controls/button'
|
|
3
|
+
import {Dialog} from './dialog'
|
|
4
4
|
|
|
5
5
|
const defaultConfirmCaption = 'Confirm'
|
|
6
6
|
const defaultCancelCaption = 'Cancel'
|