From 453597c587bc3a6946e6429ebbdb9cdc5ef5f8d7 Mon Sep 17 00:00:00 2001 From: Yuri Visser Date: Tue, 3 Sep 2024 19:22:07 -0300 Subject: [PATCH] v1.0.2 (#106) * update logic for active signer check (#65) * upgrade to thirdweb sdk v4.15.0 (#66) * upgrade to thirdweb sdk v4.15.0 * remove obsolete thirdweb assets * update code to work with new sdk * deprecate ThirdwebManager usage in favour of ThirdwebSDK (#67) * deprecate ThirdwebManager usage in favour of ThirdwebSDK * remove test harness config * remove config assets * break out supported chains to separate var for consistency * gitignore configs * pull supported chains from constants; revert newtonsoft imports --------- Co-authored-by: Alec Ananian <1013230+alecananian@users.noreply.github.com> * support desktop target in helika config (#68) * Marco/profile logo (#69) * make header logo scale with image * add public GetProject method * download image from url * remove player prefs --------- Co-authored-by: Alec Ananian <1013230+alecananian@users.noreply.github.com> * add abi param to write transaction request * [WIP] Remove Unity API usage from Analytics (#63) * swap UnityWebRequest for HttpClient * remove unity api dependency for analytics * minor var name changes * further renaming * dispatch TKDLogger callbacks from main thread * added additional tracking ui/methods * rudimentary pass at engine api isolation * formatting * tweaks to abstracted engine api * added player prefs to TDKAbstractedEngineApi * implemented local settings for persisted even batches * clarified highPriority condition and failover * only print num persisted batches if there are any * add public FlushCache method * add code for deleting stale batch files (30 days old) - commented * typo * change scripting define to TREASURE_ANALYTICS; add highPriority var to event tracking * use higher-level tasks for analytics cache * flush disc cache on startup * workaround for webgl event tracking - track immediate with no caching * Update Assets/Treasure/TDK/Runtime/Utils/LocalSettings.cs Co-authored-by: lefarchi <126019820+lefarchi@users.noreply.github.com> * Update Assets/Treasure/TDK/Runtime/Utils/LocalSettings.cs Co-authored-by: lefarchi <126019820+lefarchi@users.noreply.github.com> * Add test setup and analytics test (WIP) (#70) * Add test setup and analytics test (WIP) * Allow mocking httpClient for tests + improve analytics test * Test batch events (WIP) * Fix infinite retries when uploading disk event cache * Properly log errors when flushing events. Roll back changes to TDK initializer * Use PostAsync instead of SendAsync * Improve error handling --------- Co-authored-by: lefarchi <126019820+lefarchi@users.noreply.github.com> * Update dev server URL (#71) * upgrade to Thirdweb SDK v4.16.4; fix session start and social login (#72) * Update dev server URL * Update thirdweb SDK to v4.16.4 * Set smart wallet config defaults (fixes Start User Session) * Properly pass clientId when connecting (fixes socials login) --------- Co-authored-by: Alec Ananian <1013230+alecananian@users.noreply.github.com> * update thirdweb version (#73) * Dispaly error message when user dont have internet connection. * Invert internet connection condition for clarity * Run disk flush independently every 60 seconds to ensure there is no overlap * Remove unnecessary Task.Run nesting. Remove redundant FlushDiskCache call. * Add internet connection check to abstracted engine api * Skip disk flush when no internet available * Change tabs to spaces * Avoid unnecessary log when there is no connection * Fix/opt click out error (#76) * Fix issues with email + otp login - Fix object reference error when clicking out of otp screen and connecting again - Fix infinite spinner when submitting otp a second time * Request OTP again if user manually hits disconnect button * Remove unity editor reference from otp submit logic * Use EndUserSession when user disconnects * Suggested changes * fix bridgeworld deposit magic helper (#77) * fix server time url (#78) * fix server time url (#79) * v0.5.0 Prep (#81) * change default logo and game name * bumped version to 0.5.0 * upgrade helika sdk to 0.2.0 * upgrade thirdweb sdk to 4.16.6 * Print a warning when config for a service is missing (#82) --------- Co-authored-by: lefarchi <126019820+lefarchi@users.noreply.github.com> * comment method decorators for individual config creation (#83) * clear out readme and point to docs portal * Add Magicswap submodule with first 3 endpoints (+ harness test screen) (#85) * Add Magicswap submodule with first 3 endpoints (+ harness test screen) * Move api calls to TDK.API class * Integration tests, logger levels, magicswap tweaks, chain switching improvements (#86) * Add integration test for connect flow * Add loggerLevel and autoInitialize properties to TDKConfig * Fix Magicswap type (priceUSD). Improve error handling on UI * Refactor TDKLogger * Use LogDebug to log event payload. Allow config of different log level for prod * Tweak MagicswapUI responsiveness * Use debug logger in tests. Update integration tests * Skip unnecessarily re-initializing thirdweb sdk when switching to same chain * Tests for IdentityUI * Properly reconnect when switching chains after socials login * Refactor reconnect methods. Expose Reconnect(email) method * Rename methods for clarity * add swap functionality to Magicswap service (#87) * Swap endpoint (WIP) * Add swap method to magicswap module * Misc improvements * Show relevant metadata for magicswap * Remove hardcoded treasure id * Use magic contract address. Clean up TODOs * Use AppSettingsData for project info. Remove references to Project (#88) * Use AppSettingsData for project info. Remove references to Project * rename vars for clarity * Add Edit Settings item under Treasure menu * New JSON shape and unify config files - Merge AppSettingsData into TDKConfig - Merge TDKThirdwebConfig into TDKConfig - Update json parser for new format - Remove LoginSettings config * add nativeTokenLimitPerTransaction parsing from config --------- Co-authored-by: Alec Ananian <1013230+alecananian@users.noreply.github.com> * Add API key header to HTTP requests (#89) * add api key handling to tdk config * added x-api-key header additions to darkmatter ingest * add x-api-key header to timekeeper request * fix webgl ref * Add api key to TDK.API requests. Remove api key from timekeeper requests --------- Co-authored-by: lefarchi * Create classes for TDK config sections so they are grouped in inspector (#90) * Add tdk props to Helika tracking (#91) * add tdk props to helika tracking * track to correct service * upgrade thirdweb sdk to v4.19.0 (#92) * Switch to explicit disable vs enable scripting define for Treasure analytics (#93) * switch to explicit disable vs enable scripting define for treasure analytics * remove TDK_THIRDWEB scripting define usage * bumped tdk version to v1.0.0 * fix chain_id event prop addition for helika * brought in thirdweb sdk 4.20.0 * Change TREASURE_ANALYTICS to !DISABLE_TREASURE_ANALTYICS in test asmdef constraints * bypass kochava error --------- Co-authored-by: lefarchi * Add magicswap liquidity endpoints (#94) * Implement "add liquidity" in harness - Button to approve treasures for magicswap - Show treasures approval status in label - Pass proper args to AddLiquidity * Properly send backendWallet in magicswap endpoints * Default swapLeftover to true * Magicswap remove liquidity (#95) * Refactor magicswapUI add liquidity for clarity * Set isExactOut to true on test swap * Implement RemoveLiquidity. Add button to approve LP * update session validation logic (#97) * Skip custom logging logic when app is shutting down (#96) * Skip custom logging logic when app is shutting down * Remove unused statements from TDKLogger * added/moved to appIsQuitting in main tdk instance * added appIsQuitting to base service * don't attempt event transmission on app quit (only persist - will be sent on next launch) * lifted analytics flush frequency settings to config * remove connect settings from packager --------- Co-authored-by: Yuri Visser * changed meta files * updated helika sdk to v0.2.1 (#99) * bumped helika sdk version in versions.txt; bumped tdk version to 1.0.1 * Swap out facebook login with discord (#100) * Make AppConfig static. Tweak singleton handling (#101) - Avoid recreating instance of TDK on quit - Explicitly initialize TDKMainThreadDispatcher - Pass isAppQuitting flag from TerminateCacheFlushing * V1 cleanup (#102) * Remove outdated TODO comment * Remove old unit test files * Remove outdated comment * Remove OnEmailOTPVerificationSuccess event * Test tweaks * Catch errors on analytics tracking to avoid disrupting caller flow * Rollback Task.Delay usage * Hide discord login option on webgl * Fix metadata fetching on harness scene for webgl * Remove merge markers. Remove duplicate code in analytics service. Remove old code (#104) * re-added helika props * update to latest MagicswapV2Router contract address (#105) * bump to version 1.0.2 --------- Co-authored-by: Alec Ananian <1013230+alecananian@users.noreply.github.com> Co-authored-by: Marco Zakaria Co-authored-by: lefarchi <126019820+lefarchi@users.noreply.github.com> Co-authored-by: lefarchi --- Assets/Treasure/TDK/Runtime/Common/Constants.cs | 4 ++-- Assets/Treasure/TDK/Runtime/TDKVersion.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Treasure/TDK/Runtime/Common/Constants.cs b/Assets/Treasure/TDK/Runtime/Common/Constants.cs index b23d46c2..570379ce 100644 --- a/Assets/Treasure/TDK/Runtime/Common/Constants.cs +++ b/Assets/Treasure/TDK/Runtime/Common/Constants.cs @@ -55,7 +55,7 @@ public static class Constants { Contract.ERC1155TokenSetCorruptionHandler, "0x3c62778d8e01ed17c1048b64edaf121d36c71a4e" }, { Contract.HarvesterEmberwing, "0x36882e71d11eadd9f869b0fd70d18d5045939986" }, { Contract.ManagedAccountFactory, "0x463effb51873c7720c810ac7fb2e145ec2f8cc60" }, - { Contract.MagicswapV2Router, "0xb740d5804ea2061432469119cfa40cbb4586dd17" }, + { Contract.MagicswapV2Router, "0xf7c8f888720d5af7c54dfc04afe876673d7f5f43" }, { Contract.ZeeverseZee, "0x094fa8ae08426ab180e71e60fa253b079e13b9fe" }, { Contract.ZeeverseItems, "0x58318bceaa0d249b62fad57d134da7475e551b47" }, { Contract.ZeeverseVeeClaimer, "0x1cebdde81a9e4cd377bc7da5000797407cf9a58a" }, @@ -72,7 +72,7 @@ public static class Constants { Contract.ERC1155TokenSetCorruptionHandler, "0x937817e7fe8e3b3543db46f14473d5f110a79ece" }, { Contract.HarvesterEmberwing, "0x816c0717cf263e7da4cd33d4979ad15dbb70f122" }, { Contract.ManagedAccountFactory, "0xae7f7e9286f5f9ede167a19d1d605df4fdbc417b" }, - { Contract.MagicswapV2Router, "0xd0a4fbcc5cde863a2be50c75b564efd942b03154" }, + { Contract.MagicswapV2Router, "0xa8654a8097b78daf740c1e2ada8a6bf3cd60da50" }, { Contract.ZeeverseZee, "0xb1af672c7e0e8880c066ecc24930a12ff2ee8534" }, { Contract.ZeeverseItems, "0xfaad5aa3209ab1b25ede22ed4da5521538b649fa" }, { Contract.ZeeverseVeeClaimer, "0xf7abce65b1e683b7a42113f69ef76ee35cabbddc" } diff --git a/Assets/Treasure/TDK/Runtime/TDKVersion.cs b/Assets/Treasure/TDK/Runtime/TDKVersion.cs index f605441e..b7af5f56 100644 --- a/Assets/Treasure/TDK/Runtime/TDKVersion.cs +++ b/Assets/Treasure/TDK/Runtime/TDKVersion.cs @@ -3,6 +3,6 @@ public static class TDKVersion { public static string name = "tdk-unity"; - public static string version = "1.0.1"; + public static string version = "1.0.2"; } }