From 542920a5128a6a80faa0459dc72bbbe1afe92539 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 27 Dec 2024 03:31:48 +0200 Subject: [PATCH] Remove payfura (#1904) * change Solana node * Fix reaching limit for fetching transactions * Remove payfura --- .../workflows/automated_integration_test.yml | 1 - .github/workflows/pr_test_build_android.yml | 1 - .github/workflows/pr_test_build_linux.yml | 1 - lib/buy/payfura/payfura_buy_provider.dart | 24 ------------------- lib/di.dart | 6 ----- tool/utils/secret_key.dart | 1 - 6 files changed, 34 deletions(-) delete mode 100644 lib/buy/payfura/payfura_buy_provider.dart diff --git a/.github/workflows/automated_integration_test.yml b/.github/workflows/automated_integration_test.yml index 9eba75cc0..b299c9340 100644 --- a/.github/workflows/automated_integration_test.yml +++ b/.github/workflows/automated_integration_test.yml @@ -171,7 +171,6 @@ jobs: echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart - echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> lib/.secrets.g.dart echo "const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';" >> lib/.secrets.g.dart echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> lib/.secrets.g.dart diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index 951b20dab..cdd0e40b4 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -182,7 +182,6 @@ jobs: echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart - echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> lib/.secrets.g.dart echo "const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';" >> lib/.secrets.g.dart echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> lib/.secrets.g.dart diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index 89c4af8f2..891327d1e 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -154,7 +154,6 @@ jobs: echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart - echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart echo "const ankrApiKey = '${{ secrets.ANKR_API_KEY }}';" >> lib/.secrets.g.dart echo "const chainStackApiKey = '${{ secrets.CHAIN_STACK_API_KEY }}';" >> lib/.secrets.g.dart echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart diff --git a/lib/buy/payfura/payfura_buy_provider.dart b/lib/buy/payfura/payfura_buy_provider.dart deleted file mode 100644 index eb9104df0..000000000 --- a/lib/buy/payfura/payfura_buy_provider.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:cake_wallet/.secrets.g.dart' as secrets; -import 'package:cake_wallet/store/settings_store.dart'; -import 'package:cw_core/wallet_base.dart'; - -class PayfuraBuyProvider { - PayfuraBuyProvider({required SettingsStore settingsStore, required WalletBase wallet}) - : this._settingsStore = settingsStore, - this._wallet = wallet; - - final SettingsStore _settingsStore; - final WalletBase _wallet; - - static const _baseUrl = 'exchange.payfura.com'; - - Uri requestUrl() { - return Uri.https(_baseUrl, '', { - 'apiKey': secrets.payfuraApiKey, - 'to': _wallet.currency.title, - 'from': _settingsStore.fiatCurrency.title, - 'walletAddress': '${_wallet.currency.title}:${_wallet.walletAddresses.address}', - 'mode': 'buy' - }); - } -} diff --git a/lib/di.dart b/lib/di.dart index 358f72a77..91ec692ef 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -11,7 +11,6 @@ import 'package:cake_wallet/buy/dfx/dfx_buy_provider.dart'; import 'package:cake_wallet/buy/moonpay/moonpay_provider.dart'; import 'package:cake_wallet/buy/onramper/onramper_buy_provider.dart'; import 'package:cake_wallet/buy/order.dart'; -import 'package:cake_wallet/buy/payfura/payfura_buy_provider.dart'; import 'package:cake_wallet/core/new_wallet_arguments.dart'; import 'package:cake_wallet/buy/robinhood/robinhood_buy_provider.dart'; import 'package:cake_wallet/core/auth_service.dart'; @@ -1022,11 +1021,6 @@ Future setup({ getIt.registerFactoryParam((title, uri) => WebViewPage(title, uri)); - getIt.registerFactory(() => PayfuraBuyProvider( - settingsStore: getIt.get().settingsStore, - wallet: getIt.get().wallet!, - )); - getIt.registerFactory(() => ExchangeViewModel( getIt.get(), _tradesSource, diff --git a/tool/utils/secret_key.dart b/tool/utils/secret_key.dart index b7a581ff8..5c316c54b 100644 --- a/tool/utils/secret_key.dart +++ b/tool/utils/secret_key.dart @@ -30,7 +30,6 @@ class SecretKey { SecretKey('twitterBearerToken', () => ''), SecretKey('anonPayReferralCode', () => ''), SecretKey('fiatApiKey', () => ''), - SecretKey('payfuraApiKey', () => ''), SecretKey('chatwootWebsiteToken', () => ''), SecretKey('exolixApiKey', () => ''), SecretKey('robinhoodApplicationId', () => ''),