diff --git a/Assets/SequenceSDK/Marketplace/CurrencySwapTests.cs b/Assets/SequenceSDK/Marketplace/CurrencySwapTests.cs index 4e28bc69..1e088f23 100644 --- a/Assets/SequenceSDK/Marketplace/CurrencySwapTests.cs +++ b/Assets/SequenceSDK/Marketplace/CurrencySwapTests.cs @@ -117,7 +117,7 @@ public async Task GetSwapQuoteTest_FailedToFetchPrice() } catch (Exception e) { - Assert.IsTrue(e.Message.Contains("Error fetching swap price")); + Assert.IsTrue(e.Message.Contains("Error fetching swap quote")); } } } diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/CurrencySwap.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/CurrencySwap.cs index d324ac1c..0bef96f3 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/CurrencySwap.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/CurrencySwap.cs @@ -35,17 +35,17 @@ public async Task GetSwapPrice(Address buyCurrency, Address sellCurre { GetSwapPriceRequest args = new GetSwapPriceRequest(buyCurrency, sellCurrency, buyAmount, _chain, slippagePercent); - string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapPrice"; + string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapPermit2Price"; try { GetSwapPriceResponse response = await _client.SendRequest(url, args); - if (response.swapPrice == null) + if (response.swapPermit2Price == null) { throw new Exception("No swap path with sufficient liquidity found"); } - OnSwapPriceReturn?.Invoke(response.swapPrice); - return response.swapPrice; + OnSwapPriceReturn?.Invoke(response.swapPermit2Price); + return response.swapPermit2Price; } catch (Exception e) { @@ -64,13 +64,13 @@ public async Task GetSwapPrices(Address userWallet, Address buyCurr { GetSwapPricesRequest args = new GetSwapPricesRequest(userWallet, buyCurrency, buyAmount, _chain, slippagePercentage); - string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapPrices"; + string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapPermit2Prices"; try { GetSwapPricesResponse response = await _client.SendRequest(url, args); - OnSwapPricesReturn?.Invoke(response.swapPrices); - return response.swapPrices; + OnSwapPricesReturn?.Invoke(response.swapPermit2Prices); + return response.swapPermit2Prices; } catch (Exception e) { @@ -102,7 +102,7 @@ await AssertWeHaveSufficientBalance(userWallet, buyCurrency, sellCurrency, buyAm GetSwapQuoteRequest args = new GetSwapQuoteRequest(userWallet, buyCurrency, sellCurrency, buyAmount, _chain, slippagePercentage, includeApprove); - string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapQuote"; + string url = BaseUrl.AppendTrailingSlashIfNeeded() + "GetSwapQuoteV2"; try { GetSwapQuoteResponse response = diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPriceResponse.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPriceResponse.cs index 88e1c20e..e7df9f33 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPriceResponse.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPriceResponse.cs @@ -6,12 +6,12 @@ namespace Sequence.Marketplace [Serializable] internal class GetSwapPriceResponse { - public SwapPrice swapPrice; + public SwapPrice swapPermit2Price; [Preserve] - public GetSwapPriceResponse(SwapPrice swapPrice) + public GetSwapPriceResponse(SwapPrice swapPermit2Price) { - this.swapPrice = swapPrice; + this.swapPermit2Price = swapPermit2Price; } } } \ No newline at end of file diff --git a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPricesResponse.cs b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPricesResponse.cs index 30e1c704..d4306d17 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPricesResponse.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/DataTypes/GetSwapPricesResponse.cs @@ -6,12 +6,12 @@ namespace Sequence.Marketplace [Serializable] public class GetSwapPricesResponse { - public SwapPrice[] swapPrices; + public SwapPrice[] swapPermit2Prices; [Preserve] - public GetSwapPricesResponse(SwapPrice[] swapPrices) + public GetSwapPricesResponse(SwapPrice[] swapPermit2Prices) { - this.swapPrices = swapPrices; + this.swapPermit2Prices = swapPermit2Prices; } } } \ No newline at end of file diff --git a/Packages/Sequence-Unity/package.json b/Packages/Sequence-Unity/package.json index 78d57e6c..e031c49d 100644 --- a/Packages/Sequence-Unity/package.json +++ b/Packages/Sequence-Unity/package.json @@ -1,6 +1,6 @@ { "name": "xyz.0xsequence.waas-unity", - "version": "4.0.2", + "version": "4.0.3", "displayName": "Sequence Embedded Wallet SDK", "description": "A Unity SDK for Sequence APIs", "unity": "2021.3",