@stellar-expert/ui-framework 1.10.4 → 1.10.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stellar-expert/ui-framework",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.5",
|
|
4
4
|
"description": "StellarExpert shared UI components library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@stellar-expert/client-cache": "github:stellar-expert/client-cache",
|
|
22
22
|
"@stellar-expert/formatter": "^2.3.0",
|
|
23
23
|
"@stellar-expert/navigation": "github:stellar-expert/navigation#v1.0.2",
|
|
24
|
-
"@stellar-expert/tx-meta-effects-parser": "^5.0
|
|
24
|
+
"@stellar-expert/tx-meta-effects-parser": "^5.2.0",
|
|
25
25
|
"classnames": ">=2",
|
|
26
26
|
"prop-types": ">=15",
|
|
27
27
|
"qrcode.react": "^3.1.0",
|
|
@@ -117,8 +117,10 @@ function PathPaymentDescriptionView({op, compact}) {
|
|
|
117
117
|
if (sendMax !== undefined) {
|
|
118
118
|
if (isSwap && sendAssetId === destAssetId && effects.length) { //circular trades yield accountCredited/Debited effect
|
|
119
119
|
const changeEffect = effects.find(e => e.source === source && e.asset === sendAssetId && (e.type === 'accountCredited' || e.type === 'accountDebited'))
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
if (changeEffect) { //arbitrage successful, otherwise src = dst and no account changes happened
|
|
121
|
+
const change = BigInt(changeEffect.amount)
|
|
122
|
+
src = fromStroops(toStroops(destAmount) + (changeEffect.type === 'accountCredited' ? -change : change))
|
|
123
|
+
}
|
|
122
124
|
} else {
|
|
123
125
|
const debitedEffect = effects.find(e => e.source === source && e.type === 'accountDebited' && e.asset === sendAssetId)
|
|
124
126
|
if (debitedEffect) {
|
|
@@ -129,8 +131,10 @@ function PathPaymentDescriptionView({op, compact}) {
|
|
|
129
131
|
if (destMin !== undefined) {
|
|
130
132
|
if (isSwap && sendAssetId === destAssetId && effects.length) { //circular trades yield accountCredited/Debited effect
|
|
131
133
|
const changeEffect = effects.find(e => e.source === source && e.asset === destAssetId && (e.type === 'accountCredited' || e.type === 'accountDebited'))
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
if (changeEffect) { //arbitrage successful, otherwise src = dst and no account changes happened
|
|
135
|
+
const change = BigInt(changeEffect.amount)
|
|
136
|
+
dst = fromStroops(toStroops(destAmount) + (changeEffect.type === 'accountCredited' ? change : -change))
|
|
137
|
+
}
|
|
134
138
|
} else {
|
|
135
139
|
const creditedEffect = effects.find(e => e.source === destination && e.type === 'accountCredited' && e.asset === destAssetId)
|
|
136
140
|
if (creditedEffect) {
|