Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
6bac24a4
Commit
6bac24a4
authored
Oct 09, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
df1b743b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
26 deletions
+30
-26
RELEASE
RELEASE
+7
-7
VERSION
VERSION
+1
-1
swapSaga.ts
apps/web/src/state/sagas/transactions/swapSaga.ts
+19
-6
tradingApi.ts
...niswap/src/features/transactions/swap/utils/tradingApi.ts
+3
-12
No files found.
RELEASE
View file @
6bac24a4
IPFS hash of the deployment:
- CIDv0: `Qm
bPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G
`
- CIDv1: `bafybei
gb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5km
e`
- CIDv0: `Qm
SSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ
`
- CIDv1: `bafybei
b44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owd
e`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
...
@@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://bafybei
gb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5km
e.ipfs.dweb.link/
- https://bafybei
gb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5km
e.ipfs.cf-ipfs.com/
- [ipfs://Qm
bPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G/](ipfs://QmbPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G
/)
- https://bafybei
b44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owd
e.ipfs.dweb.link/
- https://bafybei
b44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owd
e.ipfs.cf-ipfs.com/
- [ipfs://Qm
SSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ/](ipfs://QmSSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ
/)
### 5.50.
1 (2024-10-07
)
### 5.50.
2 (2024-10-09
)
### Bug Fixes
* **web:**
invalidate local activity cache for updates to transaction or signature state - prod (#12732) 74b24f2
* **web:**
log step and original error on web (#12826) 5d4bd4f
VERSION
View file @
6bac24a4
web/5.50.1
\ No newline at end of file
web/5.50.2
\ No newline at end of file
apps/web/src/state/sagas/transactions/swapSaga.ts
View file @
6bac24a4
...
...
@@ -54,8 +54,10 @@ import {
import
{
isClassic
}
from
'
uniswap/src/features/transactions/swap/utils/routing
'
import
{
getClassicQuoteFromResponse
}
from
'
uniswap/src/features/transactions/swap/utils/tradingApi
'
import
{
createSaga
}
from
'
uniswap/src/utils/saga
'
import
{
errorToString
}
from
'
utilities/src/errors
'
import
{
percentFromFloat
}
from
'
utilities/src/format/percent
'
import
{
logger
}
from
'
utilities/src/logger/logger
'
import
{
LoggerErrorContext
}
from
'
utilities/src/logger/types
'
import
{
didUserReject
}
from
'
utils/swapErrorToUserReadableMessage
'
interface
HandleSwapStepParams
extends
Omit
<
HandleOnChainStepParams
,
'
step
'
|
'
info
'
>
{
...
...
@@ -206,9 +208,7 @@ function* classicSwap(
}
}
catch
(
error
)
{
const
displayableError
=
getDisplayableError
(
error
,
step
)
if
(
displayableError
)
{
logger
.
error
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
classicSwap
'
}
})
}
logSwapError
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
classicSwap
'
}
})
onFailure
(
displayableError
)
return
}
...
...
@@ -256,9 +256,7 @@ function* uniswapXSwap(
}
}
catch
(
error
)
{
const
displayableError
=
getDisplayableError
(
error
,
step
)
if
(
displayableError
)
{
logger
.
error
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
uniswapXSwap
'
}
})
}
logSwapError
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
uniswapXSwap
'
}
})
onFailure
(
displayableError
)
return
}
...
...
@@ -267,6 +265,21 @@ function* uniswapXSwap(
yield
*
call
(
onSuccess
)
}
function
logSwapError
(
error
:
TransactionError
|
undefined
,
captureContext
:
LoggerErrorContext
)
{
if
(
error
instanceof
TransactionStepFailedError
)
{
logger
.
error
(
{
...
error
,
step
:
JSON
.
stringify
(
error
.
step
),
originalError
:
errorToString
(
error
.
originalError
),
},
captureContext
,
)
}
else
if
(
error
)
{
logger
.
error
(
error
,
captureContext
)
}
}
function
getDisplayableError
(
error
:
Error
,
step
:
TransactionStep
):
TransactionError
|
undefined
{
// If the user rejects a request, or it's a known interruption e.g. trade update, we handle gracefully / do not show error UI
if
(
didUserReject
(
error
)
||
error
instanceof
HandledTransactionInterrupt
)
{
...
...
packages/uniswap/src/features/transactions/swap/utils/tradingApi.ts
View file @
6bac24a4
...
...
@@ -327,19 +327,10 @@ export function validateTrade({
const
inputsMatch
=
areAddressesEqual
(
currencyIn
.
wrapped
.
address
,
trade
?.
inputAmount
.
currency
.
wrapped
.
address
)
const
outputsMatch
=
areAddressesEqual
(
currencyOut
.
wrapped
.
address
,
trade
.
outputAmount
.
currency
.
wrapped
.
address
)
// TODO(MOB-3028): check if this logic needs any adjustments once we add UniswapX support.
// Verify the amount specified in the quote response matches the exact amount from input state
const
exactAmountFromQuote
=
isClassicQuote
(
trade
.
quote
?.
quote
)
?
exactCurrencyField
===
CurrencyField
.
INPUT
?
trade
.
quote
.
quote
.
input
?.
amount
:
trade
.
quote
.
quote
.
output
?.
amount
:
undefined
const
tokenAddressesMatch
=
inputsMatch
&&
outputsMatch
const
exactAmountsMatch
=
exactAmount
?.
toExact
()
!==
exactAmountFromQuote
if
(
!
(
tokenAddressesMatch
&&
exactAmountsMatch
))
{
logger
.
error
(
new
Error
(
`Mismatched
${
!
tokenAddressesMatch
?
'
address
'
:
'
exact amount
'
}
in swap trade`
),
{
// TODO(WEB-5132): Add validation checking that exact amount from response matches exact amount from user input
if
(
!
tokenAddressesMatch
)
{
logger
.
error
(
new
Error
(
`Mismatched address in swap trade`
),
{
tags
:
{
file
:
'
tradingApi/utils
'
,
function
:
'
validateTrade
'
},
extra
:
{
formState
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment