Skip to content

Commit 9de3b72

Browse files
ci(release): publish latest release
1 parent 3defbbd commit 9de3b72

File tree

592 files changed

+14520
-9410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

592 files changed

+14520
-9410
lines changed

RELEASE

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmWDHt9C34V3ARMDrzfCHtnhJd9T3RdJ5UEvYRV2cRhBEC`
3-
- CIDv1: `bafybeidu7lqw7ls7lcaxytltxl3vr7xk3hne5lrs22rmndx7vvc5ovsbiu`
2+
- CIDv0: `QmQ2oCvxsKb6KLE7XeR4ppyZWhiAsEAMwtXta9Gwtvptnx`
3+
- CIDv1: `bafybeiazesdn7jujaopqkz3nwemsmtbdp4fcxvjv75cevqgm3fhe65nwdu`
44

55
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
66

@@ -10,15 +10,68 @@ You can also access the Uniswap Interface from an IPFS gateway.
1010
Your Uniswap settings are never remembered across different URLs.
1111

1212
IPFS gateways:
13-
- https://bafybeidu7lqw7ls7lcaxytltxl3vr7xk3hne5lrs22rmndx7vvc5ovsbiu.ipfs.dweb.link/
14-
- https://bafybeidu7lqw7ls7lcaxytltxl3vr7xk3hne5lrs22rmndx7vvc5ovsbiu.ipfs.cf-ipfs.com/
15-
- [ipfs://QmWDHt9C34V3ARMDrzfCHtnhJd9T3RdJ5UEvYRV2cRhBEC/](ipfs://QmWDHt9C34V3ARMDrzfCHtnhJd9T3RdJ5UEvYRV2cRhBEC/)
13+
- https://bafybeiazesdn7jujaopqkz3nwemsmtbdp4fcxvjv75cevqgm3fhe65nwdu.ipfs.dweb.link/
14+
- https://bafybeiazesdn7jujaopqkz3nwemsmtbdp4fcxvjv75cevqgm3fhe65nwdu.ipfs.cf-ipfs.com/
15+
- [ipfs://QmQ2oCvxsKb6KLE7XeR4ppyZWhiAsEAMwtXta9Gwtvptnx/](ipfs://QmQ2oCvxsKb6KLE7XeR4ppyZWhiAsEAMwtXta9Gwtvptnx/)
1616

17-
## 5.33.0 (2024-06-10)
17+
## 5.34.0 (2024-06-12)
1818

1919

2020
### Features
2121

22-
* **web:** add quoteId to Xv2 rfq POST (#8908) 6fd2f1e
22+
* **web:** [multichain] 4070 add chain approval to swap execution flow (#8284) f645d37
23+
* **web:** [multichain] 4101 update chain id in swap and limit context (#8363) 83cf952
24+
* **web:** [multichain] 4121 add switch chain to send execution flow (#8060) a40162b
25+
* **web:** [multichain] 4127 fallback to gql (token balances) when chain is not synced (#8059) 9848242
26+
* **web:** 4194 use correct native currency in send (#8446) dbff9f3
27+
* **web:** 4194 use correct native currency in swap (#8448) 27a34cd
28+
* **web:** 4250 - add UniverseChainInfo and UniverseChainId types (#8632) 5c6208a
29+
* **web:** 4250 - create UNIVERSE_CHAIN_INFO and mainnet property (#8633) db60dc7
30+
* **web:** 4250 - move RPCType and DEFAULT_NATIVE_ADDRESS to uniswap pkg (#8634) f578d39
31+
* **web:** 4250 - pull all chain info from universe (#8643) d76fbf2
32+
* **web:** 4250 - use mainnet from UniverseChainInfo on wallet (#8636) 2161df6
33+
* **web:** 4250 - use mainnet from UniverseChainInfo on web (#8635) 2864084
34+
* **web:** Add base to supported moonpay chains (#8805) d06d5cb
35+
* **web:** add infringing LV nft collections (#8719) 095e89c
36+
* **web:** Add Moonpay deeplink (#8806) 81e6971
37+
* **web:** add quoteId to Xv2 rfq POST (#8909) 54a936b
38+
* **web:** add unauthenticated FOR transaction fetcher to uniswap package (#8587) 3a6ccfe
39+
* **web:** adding zora (#8711) e99544c
40+
* **web:** FOR - share token picker button (#8741) 3048ad2
41+
* **web:** migrate off direct console logging (#8334) e5f9873
42+
* **web:** move basic sharable ForAggregator API calls to uniswap package (#8553) fa54d49
43+
* **web:** move Pill component to shared uniswap package (#8701) 4806ede
44+
* **web:** Refreshed nav "Get Started" modal (#8642) 6a0e15d
45+
* **web:** Refreshed nav better app layout (#8625) 4b23b54
46+
* **web:** Refreshed nav chain selector dropdown (#8627) b5d092c
47+
* **web:** Refreshed nav company menu dropdown (#8641) b7b2244
48+
* **web:** Refreshed nav preferences menu and theme toggle (#8628) 9d43d7d
49+
* **web:** Refreshed nav prep work, organize files (#8622) 9c8b5f7
50+
* **web:** Replace direct thegraph queries with new BE queries (#8626) 5081b54
51+
* **web:** share country picker component for FOR (#8702) 3800c04
52+
53+
54+
### Bug Fixes
55+
56+
* **web:** [multichain] token selector in TDP should use connected chain (#8963) 6ef7dbc
57+
* **web:** AccountDrawer still showing in in-app browser on scroll when closed (#8623) ae322cb
58+
* **web:** can't switch to mainnet if first pageload has chain query param (#8684) d2e3bfb
59+
* **web:** connector may be undefined on landing page (#8822) 9323bd4
60+
* **web:** dialog button should no longer be disabled (#8849) 56285db
61+
* **web:** don't disable swap settings for unconnected chains (#8651) 141b089
62+
* **web:** fix missing translation, despite matching the library doesnt work with fee.bestForStable (#8629) 9470c59
63+
* **web:** liquidity translations (#8821) 4744be8
64+
* **web:** Pass account to send in transferInfo - staging (#8902) 786dead
65+
* **web:** patch wagmi to fix MM bug (#8841) 834a26c
66+
* **web:** Remove duplicate app promo banners (#8646) b35c3c1
67+
* **web:** removing zora from network selector when feature flag is off (#8960) e1eb12d
68+
* **web:** update useOnClickOutside to handle tooltips (#8704) 3697c7e
69+
* **web:** use address, chainId, from useAccount instead of web3-react (#8513) 26bc9fb
70+
* **web:** use orders text in CancelLimitDialog (#8706) 3fb4151
71+
72+
73+
### Continuous Integration
74+
75+
* **web:** update sitemaps f972a73
2376

2477

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.33.0
1+
web/5.34.0

apps/mobile/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,17 @@ android {
131131
dev {
132132
isDefault(true)
133133
applicationIdSuffix ".dev"
134-
versionName "1.28"
134+
versionName "1.29"
135135
dimension "variant"
136136
}
137137
beta {
138138
applicationIdSuffix ".beta"
139-
versionName "1.28"
139+
versionName "1.29"
140140
dimension "variant"
141141
}
142142
prod {
143143
dimension "variant"
144-
versionName "1.28"
144+
versionName "1.29"
145145
}
146146
}
147147

apps/mobile/android/app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
android:dataExtractionRules="@xml/data_extraction_rules"
2121
android:localeConfig="@xml/locales_config"
2222
android:theme="@style/AppTheme">
23+
24+
<meta-data
25+
android:name="com.onesignal.messaging.default_notification_icon"
26+
android:resource="@drawable/ic_stat_onesignal_default" />
27+
28+
<meta-data
29+
android:name="com.onesignal.NotificationAccentColor.DEFAULT"
30+
android:value="@string/notification_accent_color" />
31+
2332
<activity
2433
android:name=".MainActivity"
2534
android:label="@string/app_name"

apps/mobile/android/app/src/main/java/com/uniswap/RNEthersRSModule.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import com.facebook.react.bridge.WritableArray
77
import com.facebook.react.bridge.WritableNativeArray
88
import com.facebook.react.module.annotations.ReactModule
99
import com.facebook.soloader.SoLoader
10+
import kotlinx.coroutines.CoroutineScope
11+
import kotlinx.coroutines.Dispatchers
12+
import kotlinx.coroutines.SupervisorJob
13+
import kotlinx.coroutines.launch
1014

1115
/**
1216
* Bridge between the React Native JavaScript code and the native Android code.
@@ -18,6 +22,7 @@ import com.facebook.soloader.SoLoader
1822
class RNEthersRSModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
1923

2024
private val ethersRs: RnEthersRs = RnEthersRs(reactContext.applicationContext)
25+
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
2126

2227
// Needs to be initialized form a static context
2328
companion object {
@@ -40,6 +45,12 @@ class RNEthersRSModule(reactContext: ReactApplicationContext) : ReactContextBase
4045
promise.resolve(ethersRs.importMnemonic(mnemonic))
4146
}
4247

48+
@ReactMethod fun removeMnemonic(mnemonicId: String, promise: Promise) {
49+
scope.launch(Dispatchers.IO) {
50+
val result = ethersRs.removeMnemonic(mnemonicId)
51+
promise.resolve(result)
52+
}
53+
}
4354

4455
@ReactMethod fun generateAndStoreMnemonic(promise: Promise) {
4556
promise.resolve(ethersRs.generateAndStoreMnemonic())
@@ -65,6 +76,13 @@ class RNEthersRSModule(reactContext: ReactApplicationContext) : ReactContextBase
6576
promise.resolve(ethersRs.generateAndStorePrivateKey(mnemonicId, derivationIndex))
6677
}
6778

79+
@ReactMethod fun removePrivateKey(address: String, promise: Promise) {
80+
scope.launch(Dispatchers.IO) {
81+
val result = ethersRs.removePrivateKey(address)
82+
promise.resolve(result)
83+
}
84+
}
85+
6886
@ReactMethod fun signTransactionHashForAddress(address: String, hash: String, chainId: Int, promise: Promise) {
6987
promise.resolve(ethersRs.signTransactionHashForAddress(address, hash, chainId.toLong()))
7088
}

apps/mobile/android/app/src/main/java/com/uniswap/RnEthersRs.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import com.uniswap.EthersRs.signHashWithWallet
1010
import com.uniswap.EthersRs.signMessageWithWallet
1111
import com.uniswap.EthersRs.signTxWithWallet
1212
import com.uniswap.EthersRs.walletFromPrivateKey
13+
import kotlinx.coroutines.CoroutineScope
14+
import kotlinx.coroutines.Dispatchers
15+
import kotlinx.coroutines.SupervisorJob
16+
import kotlinx.coroutines.launch
17+
import kotlinx.coroutines.withContext
1318

1419
class RnEthersRs(applicationContext: Context) {
1520

@@ -82,6 +87,11 @@ class RnEthersRs(applicationContext: Context) {
8287
return keychain.getString(keychainKeyForMnemonicId(mnemonicId), null)
8388
}
8489

90+
suspend fun removeMnemonic(mnemonicId: String): Boolean {
91+
keychain.edit().remove(keychainKeyForMnemonicId(mnemonicId)).apply()
92+
return true
93+
}
94+
8595
val addressesForStoredPrivateKeys: List<String>
8696
get() = keychain.all.keys
8797
.filter { key -> key.contains(PRIVATE_KEY_PREFIX) }
@@ -118,6 +128,11 @@ class RnEthersRs(applicationContext: Context) {
118128
return address
119129
}
120130

131+
suspend fun removePrivateKey(address: String): Boolean {
132+
keychain.edit().remove(keychainKeyForPrivateKey(address)).apply()
133+
return true
134+
}
135+
121136
/**
122137
* Signs a transaction for a given address.
123138
* @param address The address to sign the transaction for.

apps/mobile/android/app/src/main/java/com/uniswap/UniswapPackage.kt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@ import com.facebook.react.bridge.NativeModule
66
import com.facebook.react.bridge.ReactApplicationContext
77
import com.facebook.react.uimanager.ReactShadowNode
88
import com.facebook.react.uimanager.ViewManager
9-
import com.uniswap.onboarding.backup.MnemonicDisplayViewManager
109
import com.uniswap.onboarding.backup.MnemonicConfirmationViewManager
10+
import com.uniswap.onboarding.backup.MnemonicDisplayViewManager
1111
import com.uniswap.onboarding.import.SeedPhraseInputViewManager
1212

1313
class UniswapPackage : ReactPackage {
14-
override fun createViewManagers(
15-
reactContext: ReactApplicationContext
16-
): List<ViewManager<out View, out ReactShadowNode<*>>> = listOf(
17-
MnemonicConfirmationViewManager(),
18-
MnemonicDisplayViewManager(),
19-
SeedPhraseInputViewManager(),
20-
)
14+
override fun createViewManagers(
15+
reactContext: ReactApplicationContext
16+
): List<ViewManager<out View, out ReactShadowNode<*>>> = listOf(
17+
MnemonicConfirmationViewManager(),
18+
MnemonicDisplayViewManager(),
19+
SeedPhraseInputViewManager(),
20+
)
21+
22+
override fun createNativeModules(
23+
reactContext: ReactApplicationContext
24+
): List<NativeModule> = listOf(
25+
AndroidDeviceModule(reactContext),
26+
RNEthersRSModule(reactContext),
2127

22-
override fun createNativeModules(
23-
reactContext: ReactApplicationContext
24-
): List<NativeModule> = listOf(
25-
AndroidDeviceModule(reactContext),
26-
RNEthersRSModule(reactContext),
27-
ThemeModule(reactContext),
28-
)
28+
ThemeModule(reactContext),
29+
)
2930
}

apps/mobile/android/app/src/main/java/com/uniswap/onboarding/backup/MnemonicConfirmationViewManager.kt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,30 @@ class MnemonicConfirmationViewManager : ViewGroupManager<ComposeView>() {
2828
override fun getName(): String = REACT_CLASS
2929

3030
private val mnemonicIdFlow = MutableStateFlow("")
31+
private val shouldShowSmallTextFlow = MutableStateFlow(false)
32+
private val selectedWordPlaceholderFlow = MutableStateFlow("")
3133

3234
override fun createViewInstance(reactContext: ThemedReactContext): ComposeView {
3335
val ethersRs = RnEthersRs(reactContext)
3436
val viewModel = MnemonicConfirmationViewModel(ethersRs)
37+
3538
return ComposeView(reactContext).apply {
3639
id = R.id.mnemonic_confirmation_compose_id // Needed for RN event emitter
3740

3841
setContent {
3942
val mnemonicId by mnemonicIdFlow.collectAsState()
43+
val shouldShowSmallText by shouldShowSmallTextFlow.collectAsState()
44+
val selectedWordPlaceholder by selectedWordPlaceholderFlow.collectAsState()
45+
46+
viewModel.updatePlaceholder(selectedWordPlaceholder)
4047

4148
UniswapComponent {
42-
MnemonicConfirmation(mnemonicId = mnemonicId, viewModel = viewModel) {
43-
val reactContext = context as ReactContext
49+
MnemonicConfirmation(
50+
mnemonicId = mnemonicId,
51+
viewModel = viewModel,
52+
shouldShowSmallText = shouldShowSmallText,
53+
) {
54+
context as ReactContext
4455
reactContext
4556
.getJSModule(RCTEventEmitter::class.java)
4657
.receiveEvent(id, EVENT_COMPLETED, null) // Sends event to RN bridge
@@ -70,6 +81,16 @@ class MnemonicConfirmationViewManager : ViewGroupManager<ComposeView>() {
7081
mnemonicIdFlow.update { mnemonicId }
7182
}
7283

84+
@ReactProp(name = "shouldShowSmallText")
85+
fun setShouldShowSmallText(view: View, shouldShowSmallText: Boolean) {
86+
shouldShowSmallTextFlow.update { shouldShowSmallText }
87+
}
88+
89+
@ReactProp(name = "selectedWordPlaceholder")
90+
fun setSelectedWordPlaceholder(view: View, selectedWordPlaceholder: String) {
91+
selectedWordPlaceholderFlow.update { selectedWordPlaceholder }
92+
}
93+
7394
companion object {
7495
private const val REACT_CLASS = "MnemonicConfirmation"
7596
private const val EVENT_COMPLETED = "onConfirmComplete"

apps/mobile/android/app/src/main/java/com/uniswap/onboarding/backup/MnemonicDisplayViewManager.kt

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import android.view.View
44
import androidx.compose.runtime.collectAsState
55
import androidx.compose.runtime.getValue
66
import androidx.compose.ui.platform.ComposeView
7+
import com.facebook.react.bridge.Arguments
8+
import com.facebook.react.bridge.WritableMap
79
import com.facebook.react.uimanager.ThemedReactContext
810
import com.facebook.react.uimanager.ViewGroupManager
11+
import com.facebook.react.uimanager.ViewManager
912
import com.facebook.react.uimanager.annotations.ReactProp
13+
import com.facebook.react.uimanager.events.RCTEventEmitter
1014
import com.uniswap.RnEthersRs
1115
import com.uniswap.onboarding.backup.ui.MnemonicDisplay
1216
import com.uniswap.onboarding.backup.ui.MnemonicDisplayViewModel
@@ -22,29 +26,83 @@ class MnemonicDisplayViewManager : ViewGroupManager<ComposeView>() {
2226

2327
override fun getName(): String = REACT_CLASS
2428

29+
private lateinit var context: ThemedReactContext
30+
2531
private val mnemonicIdFlow = MutableStateFlow("")
32+
private val copyTextFlow = MutableStateFlow("")
33+
private val copiedTextFlow = MutableStateFlow("")
2634

2735
override fun createViewInstance(reactContext: ThemedReactContext): ComposeView {
36+
context = reactContext
2837
val ethersRs = RnEthersRs(reactContext)
2938
val viewModel = MnemonicDisplayViewModel(ethersRs)
3039

3140
return ComposeView(reactContext).apply {
3241
setContent {
3342
val mnemonicId by mnemonicIdFlow.collectAsState()
43+
val copyText by copyTextFlow.collectAsState()
44+
val copiedText by copiedTextFlow.collectAsState()
3445

3546
UniswapComponent {
36-
MnemonicDisplay(mnemonicId = mnemonicId, viewModel = viewModel)
47+
MnemonicDisplay(
48+
mnemonicId = mnemonicId,
49+
viewModel = viewModel,
50+
copyText = copyText,
51+
copiedText = copiedText,
52+
onHeightMeasured = {
53+
val bundle = Arguments.createMap().apply {
54+
putDouble(FIELD_HEIGHT, it.toDouble())
55+
}
56+
sendEvent(id, EVENT_HEIGHT_MEASURED, bundle)
57+
}
58+
)
3759
}
3860
}
3961
}
4062
}
4163

64+
/**
65+
* Maps local event name to expected RN prop. See RN [ViewManager] docs on github for schema.
66+
* Using bubbling instead of direct events because overriding
67+
* getExportedCustomDirectEventTypeConstants leads to a component not found error for some reason.
68+
* Direct events will try find callback prop on native component, and bubbled events will bubble
69+
* up until it finds component with the right callback prop.
70+
*/
71+
override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> {
72+
return mapOf(
73+
EVENT_HEIGHT_MEASURED to mapOf(
74+
"phasedRegistrationNames" to mapOf(
75+
"bubbled" to EVENT_HEIGHT_MEASURED,
76+
"captured" to EVENT_HEIGHT_MEASURED
77+
)
78+
)
79+
)
80+
}
81+
82+
private fun sendEvent(id: Int, eventName: String, bundle: WritableMap? = null) {
83+
context
84+
.getJSModule(RCTEventEmitter::class.java)
85+
.receiveEvent(id, eventName, bundle)
86+
}
87+
4288
@ReactProp(name = "mnemonicId")
4389
fun setMnemonicId(view: View, mnemonicId: String) {
4490
mnemonicIdFlow.update { mnemonicId }
4591
}
4692

93+
@ReactProp(name = "copyText")
94+
fun setCopyText(view: View, copyText: String) {
95+
copyTextFlow.update { copyText }
96+
}
97+
98+
@ReactProp(name = "copiedText")
99+
fun setCopiedText(view: View, copiedText: String) {
100+
copiedTextFlow.update { copiedText }
101+
}
102+
47103
companion object {
48104
private const val REACT_CLASS = "MnemonicDisplay"
105+
private const val EVENT_HEIGHT_MEASURED = "onHeightMeasured"
106+
private const val FIELD_HEIGHT = "height"
49107
}
50108
}

0 commit comments

Comments
 (0)