From 70742846e609db600c7270bcf0e262eee797c05c Mon Sep 17 00:00:00 2001 From: Stephen Heaps Date: Tue, 7 Nov 2023 11:25:18 -0500 Subject: [PATCH 1/4] Update BraveCore to v1.62.32 --- .../Crypto/Stores/SendTokenStore.swift | 41 ++++++++++--------- .../Crypto/Stores/SwapTokenStore.swift | 7 ++-- .../Preview Content/MockEthTxService.swift | 2 +- .../SwapTokenStoreTests.swift | 12 +++--- package-lock.json | 12 +++--- package.json | 2 +- 6 files changed, 39 insertions(+), 37 deletions(-) diff --git a/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift b/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift index 97e67fca1f6..bdd6a027990 100644 --- a/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift +++ b/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift @@ -337,7 +337,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { ) { let eip1559Data = BraveWallet.TxData1559(baseData: baseData, chainId: chainId, maxPriorityFeePerGas: "", maxFeePerGas: "", gasEstimation: nil) let txDataUnion = BraveWallet.TxDataUnion(ethTxData1559: eip1559Data) - self.txService.addUnapprovedTransaction(txDataUnion, from: accountId) { success, txMetaId, errorMessage in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: chainId, from: accountId) { success, txMetaId, errorMessage in completion(success, errorMessage) } } @@ -573,7 +573,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { } } else { let txDataUnion = BraveWallet.TxDataUnion(ethTxData: baseData) - self.txService.addUnapprovedTransaction(txDataUnion, from: fromAccountId) { success, txMetaId, errorMessage in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: fromAccountId) { success, txMetaId, errorMessage in self.isMakingTx = false completion(success, errorMessage) } @@ -586,7 +586,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { } let baseData = BraveWallet.TxData(nonce: "", gasPrice: "", gasLimit: "", to: token.contractAddress, value: "0x0", data: data, signOnly: false, signedTransaction: nil) let txDataUnion = BraveWallet.TxDataUnion(ethTxData: baseData) - self.txService.addUnapprovedTransaction(txDataUnion, from: fromAccountId) { success, txMetaId, errorMessage in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: fromAccountId) { success, txMetaId, errorMessage in self.isMakingTx = false completion(success, errorMessage) } @@ -605,7 +605,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { } } else { let txDataUnion = BraveWallet.TxDataUnion(ethTxData: baseData) - self.txService.addUnapprovedTransaction(txDataUnion, from: fromAccountId) { success, txMetaId, errorMessage in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: fromAccountId) { success, txMetaId, errorMessage in self.isMakingTx = false completion(success, errorMessage) } @@ -641,7 +641,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { return } let txDataUnion = BraveWallet.TxDataUnion(solanaTxData: solanaTxData) - self.txService.addUnapprovedTransaction(txDataUnion, from: fromAccountId) { success, txMetaId, errMsg in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: fromAccountId) { success, txMetaId, errMsg in completion(success, errMsg) } } @@ -658,7 +658,7 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { return } let txDataUnion = BraveWallet.TxDataUnion(solanaTxData: solanaTxData) - self.txService.addUnapprovedTransaction(txDataUnion, from: fromAccountId) { success, txMetaId, errorMessage in + self.txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: fromAccountId) { success, txMetaId, errorMessage in completion(success, errorMessage) } } @@ -679,18 +679,21 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { } isMakingTx = true - let filTxData = BraveWallet.FilTxData( - nonce: "", - gasPremium: "", - gasFeeCap: "", - gasLimit: "", - maxFee: "0", - to: sendAddress, - value: weiString - ) - self.txService.addUnapprovedTransaction(BraveWallet.TxDataUnion(filTxData: filTxData), from: fromAccountId) { success, txMetaId, errorMessage in - self.isMakingTx = false - completion(success, errorMessage) + rpcService.network(.fil, origin: nil) { [weak self] network in + guard let self = self else { return } + let filTxData = BraveWallet.FilTxData( + nonce: "", + gasPremium: "", + gasFeeCap: "", + gasLimit: "", + maxFee: "0", + to: sendAddress, + value: weiString + ) + self.txService.addUnapprovedTransaction(BraveWallet.TxDataUnion(filTxData: filTxData), chainId: network.chainId, from: fromAccountId) { success, txMetaId, errorMessage in + self.isMakingTx = false + completion(success, errorMessage) + } } } @@ -698,5 +701,3 @@ public class SendTokenStore: ObservableObject, WalletObserverStore { return await rpcService.fetchNFTMetadata(tokens: tokens, ipfsApi: ipfsApi) } } - - diff --git a/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift b/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift index a8c0d4a43b0..92ba7f94a70 100644 --- a/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift +++ b/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift @@ -407,7 +407,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { signedTransaction: nil ) let txDataUnion = BraveWallet.TxDataUnion(ethTxData: baseData) - let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, from: accountInfo.accountId) + let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: accountInfo.accountId) if !success { self.state = .error(Strings.Wallet.unknownError) self.clearAllAmount() @@ -529,7 +529,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { return success } else { let txDataUnion = BraveWallet.TxDataUnion(ethTxData: baseData) - let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, from: accountInfo.accountId) + let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, chainId: network.chainId, from: accountInfo.accountId) if !success { self.state = .error(Strings.Wallet.unknownError) self.clearAllAmount() @@ -559,7 +559,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { } let eip1559Data = BraveWallet.TxData1559(baseData: baseData, chainId: chainId, maxPriorityFeePerGas: maxPriorityFeePerGas, maxFeePerGas: maxFeePerGas, gasEstimation: gasEstimation) let txDataUnion = BraveWallet.TxDataUnion(ethTxData1559: eip1559Data) - let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, from: account.accountId) + let (success, _, _) = await txService.addUnapprovedTransaction(txDataUnion, chainId: chainId, from: account.accountId) if !success { self.state = .error(Strings.Wallet.unknownError) self.clearAllAmount() @@ -785,6 +785,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { } let (success, _, _) = await txService.addUnapprovedTransaction( .init(solanaTxData: solTxData), + chainId: network.chainId, from: accountInfo.accountId ) return success diff --git a/Sources/BraveWallet/Preview Content/MockEthTxService.swift b/Sources/BraveWallet/Preview Content/MockEthTxService.swift index dae9b47b5f8..1f06bc9b479 100644 --- a/Sources/BraveWallet/Preview Content/MockEthTxService.swift +++ b/Sources/BraveWallet/Preview Content/MockEthTxService.swift @@ -19,7 +19,7 @@ class MockTxService: BraveWalletTxService { completion(txs.first(where: { $0.id == txMetaId })) } - func addUnapprovedTransaction(_ txDataUnion: BraveWallet.TxDataUnion, from: BraveWallet.AccountId, completion: @escaping (Bool, String, String) -> Void) { + func addUnapprovedTransaction(_ txDataUnion: BraveWallet.TxDataUnion, chainId: String, from: BraveWallet.AccountId, completion: @escaping (Bool, String, String) -> Void) { completion(true, "txMetaId", "") } diff --git a/Tests/BraveWalletTests/SwapTokenStoreTests.swift b/Tests/BraveWalletTests/SwapTokenStoreTests.swift index 49c2f2e107d..ddab6d5ecb9 100644 --- a/Tests/BraveWalletTests/SwapTokenStoreTests.swift +++ b/Tests/BraveWalletTests/SwapTokenStoreTests.swift @@ -253,7 +253,7 @@ class SwapStoreTests: XCTestCase { completion(nil, "") } let txService = BraveWallet.TestTxService() - txService._addUnapprovedTransaction = { $2(true, "tx-meta-id", "") } + txService._addUnapprovedTransaction = { $3(true, "tx-meta-id", "") } let walletService = BraveWallet.TestBraveWalletService() let mockAssetManager = TestableWalletUserAssetManager() mockAssetManager._getAllUserAssetsInNetworkAssets = { _, _ in @@ -545,7 +545,7 @@ class SwapStoreTests: XCTestCase { @MainActor func testSwapERC20EIP1559Transaction() async { let (keyringService, blockchainRegistry, rpcService, swapService, txService, walletService, ethTxManagerProxy, solTxManagerProxy, mockAssetManager) = setupServices() var submittedTxData: BraveWallet.TxDataUnion? - txService._addUnapprovedTransaction = { txData, _, completion in + txService._addUnapprovedTransaction = { txData, _, _, completion in submittedTxData = txData completion(true, "tx-meta-id", "") } @@ -575,7 +575,7 @@ class SwapStoreTests: XCTestCase { // Celo Mainnet / `.mockCelo` is not EIP1559 let (keyringService, blockchainRegistry, rpcService, swapService, txService, walletService, ethTxManagerProxy, solTxManagerProxy, mockAssetManager) = setupServices(network: .mockCelo) var submittedTxData: BraveWallet.TxDataUnion? - txService._addUnapprovedTransaction = { txData, _, completion in + txService._addUnapprovedTransaction = { txData, _, _, completion in submittedTxData = txData completion(true, "tx-meta-id", "") } @@ -605,7 +605,7 @@ class SwapStoreTests: XCTestCase { @MainActor func testSwapETHSwapEIP1559Transaction() async { let (keyringService, blockchainRegistry, rpcService, swapService, txService, walletService, ethTxManagerProxy, solTxManagerProxy, mockAssetManager) = setupServices() var submittedTxData: BraveWallet.TxDataUnion? - txService._addUnapprovedTransaction = { txData, _, completion in + txService._addUnapprovedTransaction = { txData, _, _, completion in submittedTxData = txData completion(true, "tx-meta-id", "") } @@ -636,7 +636,7 @@ class SwapStoreTests: XCTestCase { // Celo Mainnet / `.mockCelo` is not EIP1559 let (keyringService, blockchainRegistry, rpcService, swapService, txService, walletService, ethTxManagerProxy, solTxManagerProxy, mockAssetManager) = setupServices(network: .mockCelo) var submittedTxData: BraveWallet.TxDataUnion? - txService._addUnapprovedTransaction = { txData, _, completion in + txService._addUnapprovedTransaction = { txData, _, _, completion in submittedTxData = txData completion(true, "tx-meta-id", "") } @@ -685,7 +685,7 @@ class SwapStoreTests: XCTestCase { completion(.init(), .success, "") } var submittedTxData: BraveWallet.TxDataUnion? - txService._addUnapprovedTransaction = { txData, _, completion in + txService._addUnapprovedTransaction = { txData, _, _, completion in submittedTxData = txData completion(true, "tx-meta-id", "") } diff --git a/package-lock.json b/package-lock.json index ed5028d554d..8cc805a5041 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.61.84/brave-core-ios-1.61.84.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", @@ -514,9 +514,9 @@ } }, "node_modules/brave-core-ios": { - "version": "1.61.84", - "resolved": "https://github.com/brave/brave-browser/releases/download/v1.61.84/brave-core-ios-1.61.84.tgz", - "integrity": "sha512-KNS95k6gUCWRYdQOa07VD7W4nIJRUPbCe5RqYdodwwpCipqTNeX4Nx8gyJygN6EhMoQEMzH45LAVJ/ZWmBxgfQ==", + "version": "1.62.32", + "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", + "integrity": "sha512-Jn3XGETwUNTPg/Qutlyr/emdx6jlGyF4RsAs0u50DlG7Ubm/OZ6wmCCahvtUzE4DZxhQ+7do5envkt5q170vXA==", "license": "ISC" }, "node_modules/browserslist": { @@ -3214,8 +3214,8 @@ } }, "brave-core-ios": { - "version": "https://github.com/brave/brave-browser/releases/download/v1.61.84/brave-core-ios-1.61.84.tgz", - "integrity": "sha512-KNS95k6gUCWRYdQOa07VD7W4nIJRUPbCe5RqYdodwwpCipqTNeX4Nx8gyJygN6EhMoQEMzH45LAVJ/ZWmBxgfQ==" + "version": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", + "integrity": "sha512-Jn3XGETwUNTPg/Qutlyr/emdx6jlGyF4RsAs0u50DlG7Ubm/OZ6wmCCahvtUzE4DZxhQ+7do5envkt5q170vXA==" }, "browserslist": { "version": "4.17.1", diff --git a/package.json b/package.json index 29c56fd15e4..1988759a23e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.61.84/brave-core-ios-1.61.84.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", From 33404be288f8d2819cd68474df8b0e58e707ebd5 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Fri, 17 Nov 2023 12:27:51 -0500 Subject: [PATCH 2/4] Update BraveCore to v1.62.61 --- .../Preview Content/MockJsonRpcService.swift | 4 ++++ package-lock.json | 12 ++++++------ package.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Sources/BraveWallet/Preview Content/MockJsonRpcService.swift b/Sources/BraveWallet/Preview Content/MockJsonRpcService.swift index 678a8ced0b0..ad240b19efc 100644 --- a/Sources/BraveWallet/Preview Content/MockJsonRpcService.swift +++ b/Sources/BraveWallet/Preview Content/MockJsonRpcService.swift @@ -256,6 +256,10 @@ class MockJsonRpcService: BraveWalletJsonRpcService { func ethTokenDecimals(_ contractAddress: String, chainId: String, completion: @escaping (String, BraveWallet.ProviderError, String) -> Void) { completion("", .internalError, "Error Message") } + + func ankrGetAccountBalances(_ accountAddress: String, chainIds: [String], completion: @escaping ([BraveWallet.AnkrAssetBalance], BraveWallet.ProviderError, String) -> Void) { + completion([], .internalError, "Error Message") + } } extension BraveWallet.NetworkInfo { diff --git a/package-lock.json b/package-lock.json index 8cc805a5041..09485e63605 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", @@ -514,9 +514,9 @@ } }, "node_modules/brave-core-ios": { - "version": "1.62.32", - "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", - "integrity": "sha512-Jn3XGETwUNTPg/Qutlyr/emdx6jlGyF4RsAs0u50DlG7Ubm/OZ6wmCCahvtUzE4DZxhQ+7do5envkt5q170vXA==", + "version": "1.62.61", + "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", + "integrity": "sha512-9jqY8Myy12gtsqzXdytHUrzcDOhH8uIl9KME6Pad1i10RRMLl6s2WRDaL80JlY/7T6CzrlNTyDebZ9POQAxBwA==", "license": "ISC" }, "node_modules/browserslist": { @@ -3214,8 +3214,8 @@ } }, "brave-core-ios": { - "version": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", - "integrity": "sha512-Jn3XGETwUNTPg/Qutlyr/emdx6jlGyF4RsAs0u50DlG7Ubm/OZ6wmCCahvtUzE4DZxhQ+7do5envkt5q170vXA==" + "version": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", + "integrity": "sha512-9jqY8Myy12gtsqzXdytHUrzcDOhH8uIl9KME6Pad1i10RRMLl6s2WRDaL80JlY/7T6CzrlNTyDebZ9POQAxBwA==" }, "browserslist": { "version": "4.17.1", diff --git a/package.json b/package.json index 1988759a23e..48c47ab20e5 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.32/brave-core-ios-1.62.32.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", From c89a258f36fac165bded7c1d190bf1a245afe0d9 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Wed, 22 Nov 2023 10:58:16 -0500 Subject: [PATCH 3/4] Update BraveCore to v1.62.70 --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 09485e63605..6bb2bec7288 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", @@ -514,9 +514,9 @@ } }, "node_modules/brave-core-ios": { - "version": "1.62.61", - "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", - "integrity": "sha512-9jqY8Myy12gtsqzXdytHUrzcDOhH8uIl9KME6Pad1i10RRMLl6s2WRDaL80JlY/7T6CzrlNTyDebZ9POQAxBwA==", + "version": "1.62.70", + "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", + "integrity": "sha512-/x65SjcVf5GpKZMBlIstrlXvXGeA8R74X25tsqpyjjB0tw+AxE73FUswJyxfwvB1S3AZxMipFhvyayqCWJQfhA==", "license": "ISC" }, "node_modules/browserslist": { @@ -3214,8 +3214,8 @@ } }, "brave-core-ios": { - "version": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", - "integrity": "sha512-9jqY8Myy12gtsqzXdytHUrzcDOhH8uIl9KME6Pad1i10RRMLl6s2WRDaL80JlY/7T6CzrlNTyDebZ9POQAxBwA==" + "version": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", + "integrity": "sha512-/x65SjcVf5GpKZMBlIstrlXvXGeA8R74X25tsqpyjjB0tw+AxE73FUswJyxfwvB1S3AZxMipFhvyayqCWJQfhA==" }, "browserslist": { "version": "4.17.1", diff --git a/package.json b/package.json index 48c47ab20e5..f2d1675dbf5 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.61/brave-core-ios-1.62.61.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", From fae798ca178b71daa2042451b45548825634ad7b Mon Sep 17 00:00:00 2001 From: Stephen Heaps Date: Thu, 30 Nov 2023 12:04:05 -0500 Subject: [PATCH 4/4] Update BraveCore to v1.62.93 --- .../BraveWallet/Crypto/Stores/SwapTokenStore.swift | 3 +++ package-lock.json | 12 ++++++------ package.json | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift b/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift index 92ba7f94a70..362c8e1a81a 100644 --- a/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift +++ b/Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift @@ -339,6 +339,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { buyAmountInWei = weiFormatter.weiString(from: buyAmount.normalizedDecimals, radix: .decimal, decimals: Int(buyToken.decimals)) ?? "0" } let swapParams = BraveWallet.SwapParams( + chainId: network.chainId, takerAddress: accountInfo.address, sellAmount: sellAmountInWei, buyAmount: buyAmountInWei, @@ -650,6 +651,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { // 0.5% is 50bps. We store 0.5% as 0.005, so multiply by 10_000 let slippageBps = Int32(swapParams.slippagePercentage * 10_000) let jupiterQuoteParams: BraveWallet.JupiterQuoteParams = .init( + chainId: network.chainId, inputMint: swapParams.sellToken, outputMint: swapParams.buyToken, amount: swapParams.sellAmount, @@ -748,6 +750,7 @@ public class SwapTokenStore: ObservableObject, WalletObserverStore { } let network = await rpcService.network(.sol, origin: nil) let jupiterSwapParams: BraveWallet.JupiterSwapParams = .init( + chainId: network.chainId, route: route, userPublicKey: accountInfo.address, inputMint: selectedFromToken.contractAddress(in: network), diff --git a/package-lock.json b/package-lock.json index 6bb2bec7288..001892b34ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.93/brave-core-ios-1.62.93.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3", @@ -514,9 +514,9 @@ } }, "node_modules/brave-core-ios": { - "version": "1.62.70", - "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", - "integrity": "sha512-/x65SjcVf5GpKZMBlIstrlXvXGeA8R74X25tsqpyjjB0tw+AxE73FUswJyxfwvB1S3AZxMipFhvyayqCWJQfhA==", + "version": "1.62.93", + "resolved": "https://github.com/brave/brave-browser/releases/download/v1.62.93/brave-core-ios-1.62.93.tgz", + "integrity": "sha512-9hQObFDNMUCJIlvLan4tdT49hLuXTf8qa8JQ9GBK2BrwdLhEbL3ShL2BwaiBtujRFGhWOUzK4XCK2VZSZdCHZQ==", "license": "ISC" }, "node_modules/browserslist": { @@ -3214,8 +3214,8 @@ } }, "brave-core-ios": { - "version": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", - "integrity": "sha512-/x65SjcVf5GpKZMBlIstrlXvXGeA8R74X25tsqpyjjB0tw+AxE73FUswJyxfwvB1S3AZxMipFhvyayqCWJQfhA==" + "version": "https://github.com/brave/brave-browser/releases/download/v1.62.93/brave-core-ios-1.62.93.tgz", + "integrity": "sha512-9hQObFDNMUCJIlvLan4tdT49hLuXTf8qa8JQ9GBK2BrwdLhEbL3ShL2BwaiBtujRFGhWOUzK4XCK2VZSZdCHZQ==" }, "browserslist": { "version": "4.17.1", diff --git a/package.json b/package.json index f2d1675dbf5..79e3e7dc906 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "MPL-2.0", "dependencies": { "@mozilla/readability": "^0.4.2", - "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.70/brave-core-ios-1.62.70.tgz", + "brave-core-ios": "https://github.com/brave/brave-browser/releases/download/v1.62.93/brave-core-ios-1.62.93.tgz", "leo": "github:brave/leo#792ab5c9f82784578e8f8fc14b9eaa24fa1956d2", "leo-sf-symbols": "github:brave/leo-sf-symbols#775bb8fca9df76679b9b272545e162418127c5de", "page-metadata-parser": "^1.1.3",