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
8f97706f
Commit
8f97706f
authored
Oct 10, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
367be52f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
31 deletions
+29
-31
RELEASE
RELEASE
+11
-6
VERSION
VERSION
+1
-1
swapSaga.ts
apps/web/src/state/sagas/transactions/swapSaga.ts
+6
-19
utils.ts
apps/web/src/state/sagas/transactions/utils.ts
+6
-5
errors.tsx
packages/uniswap/src/features/transactions/errors.tsx
+5
-0
No files found.
RELEASE
View file @
8f97706f
IPFS hash of the deployment:
IPFS hash of the deployment:
- CIDv0: `Qm
brVRA32CDwC4dhB4NStnreoYJ2xEaX3SoMW8kU5TuE7s
`
- CIDv0: `Qm
drE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i
`
- CIDv1: `bafybei
giztmprfce7w24v25bv65hos5sz464njnrahj37irfxp255e434i
`
- CIDv1: `bafybei
hgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam
`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
@@ -10,10 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
...
@@ -10,10 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
IPFS gateways:
- https://bafybei
giztmprfce7w24v25bv65hos5sz464njnrahj37irfxp255e434i
.ipfs.dweb.link/
- https://bafybei
hgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam
.ipfs.dweb.link/
- https://bafybei
giztmprfce7w24v25bv65hos5sz464njnrahj37irfxp255e434i
.ipfs.cf-ipfs.com/
- https://bafybei
hgolhp73f4twnioaonb2dvdyu2t44mxjdqx7pvnxfb7ibcosxcam
.ipfs.cf-ipfs.com/
- [ipfs://Qm
brVRA32CDwC4dhB4NStnreoYJ2xEaX3SoMW8kU5TuE7s/](ipfs://QmbrVRA32CDwC4dhB4NStnreoYJ2xEaX3SoMW8kU5TuE7s
/)
- [ipfs://Qm
drE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i/](ipfs://QmdrE1xXozbrZCb5iS5iGpjWkdJh4y7iBGHqSC1rGPcH6i
/)
### 5.50.3 (2024-10-09)
### 5.50.4 (2024-10-10)
### Bug Fixes
* **web:** pass account to getSigner instead of using default [prod] (#12883) 688582d
VERSION
View file @
8f97706f
web/5.50.3
web/5.50.4
\ No newline at end of file
\ No newline at end of file
apps/web/src/state/sagas/transactions/swapSaga.ts
View file @
8f97706f
...
@@ -54,10 +54,8 @@ import {
...
@@ -54,10 +54,8 @@ import {
import
{
isClassic
}
from
'
uniswap/src/features/transactions/swap/utils/routing
'
import
{
isClassic
}
from
'
uniswap/src/features/transactions/swap/utils/routing
'
import
{
getClassicQuoteFromResponse
}
from
'
uniswap/src/features/transactions/swap/utils/tradingApi
'
import
{
getClassicQuoteFromResponse
}
from
'
uniswap/src/features/transactions/swap/utils/tradingApi
'
import
{
createSaga
}
from
'
uniswap/src/utils/saga
'
import
{
createSaga
}
from
'
uniswap/src/utils/saga
'
import
{
errorToString
}
from
'
utilities/src/errors
'
import
{
percentFromFloat
}
from
'
utilities/src/format/percent
'
import
{
percentFromFloat
}
from
'
utilities/src/format/percent
'
import
{
logger
}
from
'
utilities/src/logger/logger
'
import
{
logger
}
from
'
utilities/src/logger/logger
'
import
{
LoggerErrorContext
}
from
'
utilities/src/logger/types
'
import
{
didUserReject
}
from
'
utils/swapErrorToUserReadableMessage
'
import
{
didUserReject
}
from
'
utils/swapErrorToUserReadableMessage
'
interface
HandleSwapStepParams
extends
Omit
<
HandleOnChainStepParams
,
'
step
'
|
'
info
'
>
{
interface
HandleSwapStepParams
extends
Omit
<
HandleOnChainStepParams
,
'
step
'
|
'
info
'
>
{
...
@@ -208,7 +206,9 @@ function* classicSwap(
...
@@ -208,7 +206,9 @@ function* classicSwap(
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
const
displayableError
=
getDisplayableError
(
error
,
step
)
const
displayableError
=
getDisplayableError
(
error
,
step
)
logSwapError
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
classicSwap
'
}
})
if
(
displayableError
)
{
logger
.
error
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
classicSwap
'
}
})
}
onFailure
(
displayableError
)
onFailure
(
displayableError
)
return
return
}
}
...
@@ -256,7 +256,9 @@ function* uniswapXSwap(
...
@@ -256,7 +256,9 @@ function* uniswapXSwap(
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
const
displayableError
=
getDisplayableError
(
error
,
step
)
const
displayableError
=
getDisplayableError
(
error
,
step
)
logSwapError
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
uniswapXSwap
'
}
})
if
(
displayableError
)
{
logger
.
error
(
displayableError
,
{
tags
:
{
file
:
'
swapSaga
'
,
function
:
'
uniswapXSwap
'
}
})
}
onFailure
(
displayableError
)
onFailure
(
displayableError
)
return
return
}
}
...
@@ -265,21 +267,6 @@ function* uniswapXSwap(
...
@@ -265,21 +267,6 @@ function* uniswapXSwap(
yield
*
call
(
onSuccess
)
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
{
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 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
)
{
if
(
didUserReject
(
error
)
||
error
instanceof
HandledTransactionInterrupt
)
{
...
...
apps/web/src/state/sagas/transactions/utils.ts
View file @
8f97706f
...
@@ -42,18 +42,19 @@ import { signTypedData } from 'utils/signing'
...
@@ -42,18 +42,19 @@ import { signTypedData } from 'utils/signing'
import
{
getConnectorClient
}
from
'
wagmi/actions
'
import
{
getConnectorClient
}
from
'
wagmi/actions
'
export
interface
HandleSignatureStepParams
<
T
extends
SignatureTransactionStep
=
SignatureTransactionStep
>
{
export
interface
HandleSignatureStepParams
<
T
extends
SignatureTransactionStep
=
SignatureTransactionStep
>
{
account
:
AccountMeta
step
:
T
step
:
T
setCurrentStep
:
SetCurrentStepFn
setCurrentStep
:
SetCurrentStepFn
ignoreInterrupt
?:
boolean
ignoreInterrupt
?:
boolean
}
}
export
function
*
handleSignatureStep
({
setCurrentStep
,
step
,
ignoreInterrupt
}:
HandleSignatureStepParams
)
{
export
function
*
handleSignatureStep
({
setCurrentStep
,
step
,
ignoreInterrupt
,
account
}:
HandleSignatureStepParams
)
{
// Add a watcher to check if the transaction flow is interrupted during this step
// Add a watcher to check if the transaction flow is interrupted during this step
const
{
throwIfInterrupted
}
=
yield
*
watchForInterruption
(
ignoreInterrupt
)
const
{
throwIfInterrupted
}
=
yield
*
watchForInterruption
(
ignoreInterrupt
)
// Trigger UI prompting user to accept
// Trigger UI prompting user to accept
setCurrentStep
({
step
,
accepted
:
false
})
setCurrentStep
({
step
,
accepted
:
false
})
const
signer
=
yield
*
call
(
getSigner
)
const
signer
=
yield
*
call
(
getSigner
,
account
.
address
)
const
signature
=
yield
*
call
(
signTypedData
,
signer
,
step
.
domain
,
step
.
types
,
step
.
values
)
// TODO(WEB-5077): look into removing / simplifying signTypedData
const
signature
=
yield
*
call
(
signTypedData
,
signer
,
step
.
domain
,
step
.
types
,
step
.
values
)
// TODO(WEB-5077): look into removing / simplifying signTypedData
// If the transaction flow was interrupted, throw an error after the step has completed
// If the transaction flow was interrupted, throw an error after the step has completed
yield
*
call
(
throwIfInterrupted
)
yield
*
call
(
throwIfInterrupted
)
...
@@ -78,7 +79,7 @@ export interface HandleOnChainStepParams<T extends OnChainTransactionStep = OnCh
...
@@ -78,7 +79,7 @@ export interface HandleOnChainStepParams<T extends OnChainTransactionStep = OnCh
export
function
*
handleOnChainStep
<
T
extends
OnChainTransactionStep
>
(
params
:
HandleOnChainStepParams
<
T
>
)
{
export
function
*
handleOnChainStep
<
T
extends
OnChainTransactionStep
>
(
params
:
HandleOnChainStepParams
<
T
>
)
{
const
{
account
,
step
,
setCurrentStep
,
info
,
allowDuplicativeTx
,
ignoreInterrupt
,
onModification
}
=
params
const
{
account
,
step
,
setCurrentStep
,
info
,
allowDuplicativeTx
,
ignoreInterrupt
,
onModification
}
=
params
const
{
chainId
}
=
step
.
txRequest
const
{
chainId
}
=
step
.
txRequest
const
signer
=
yield
*
call
(
getSigner
)
const
signer
=
yield
*
call
(
getSigner
,
account
.
address
)
// Avoid sending prompting a transaction if the user already submitted an equivalent tx, e.g. by closing and reopening a transaction flow
// Avoid sending prompting a transaction if the user already submitted an equivalent tx, e.g. by closing and reopening a transaction flow
const
duplicativeTx
=
yield
*
findDuplicativeTx
(
info
,
account
,
chainId
,
allowDuplicativeTx
)
const
duplicativeTx
=
yield
*
findDuplicativeTx
(
info
,
account
,
chainId
,
allowDuplicativeTx
)
...
@@ -236,8 +237,8 @@ async function getProvider(): Promise<Web3Provider> {
...
@@ -236,8 +237,8 @@ async function getProvider(): Promise<Web3Provider> {
return
provider
return
provider
}
}
async
function
getSigner
():
Promise
<
JsonRpcSigner
>
{
async
function
getSigner
(
account
:
string
):
Promise
<
JsonRpcSigner
>
{
return
(
await
getProvider
()).
getSigner
()
return
(
await
getProvider
()).
getSigner
(
account
)
}
}
type
SwapInfo
=
ExactInputSwapTransactionInfo
|
ExactOutputSwapTransactionInfo
type
SwapInfo
=
ExactInputSwapTransactionInfo
|
ExactOutputSwapTransactionInfo
...
...
packages/uniswap/src/features/transactions/errors.tsx
View file @
8f97706f
...
@@ -21,6 +21,7 @@ export class TransactionStepFailedError extends TransactionError {
...
@@ -21,6 +21,7 @@ export class TransactionStepFailedError extends TransactionError {
step
:
TransactionStep
step
:
TransactionStep
isBackendRejection
:
boolean
isBackendRejection
:
boolean
originalError
?:
Error
originalError
?:
Error
stringified
?:
string
constructor
({
constructor
({
message
,
message
,
...
@@ -38,6 +39,10 @@ export class TransactionStepFailedError extends TransactionError {
...
@@ -38,6 +39,10 @@ export class TransactionStepFailedError extends TransactionError {
this
.
step
=
step
this
.
step
=
step
this
.
isBackendRejection
=
isBackendRejection
this
.
isBackendRejection
=
isBackendRejection
this
.
originalError
=
originalError
this
.
originalError
=
originalError
try
{
this
.
stringified
=
JSON
.
stringify
(
this
,
null
,
2
)
// provides more insight to sentry logs
}
catch
{}
}
}
}
}
...
...
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