From 91a411fd36ddc3c3e4ae16aeca2ab8001edf6ef7 Mon Sep 17 00:00:00 2001 From: Dario Gabriel Lipicar Date: Thu, 23 Nov 2023 18:13:19 -0300 Subject: [PATCH] feat: implement support for collectibles provider Rarible Fixes #12310 --- resources/node-config.json | 2 ++ src/app_service/common/network_constants.nim | 2 ++ src/app_service/service/accounts/service.nim | 2 ++ src/constants.nim | 2 ++ src/env_cli_vars.nim | 14 ++++++++++++++ vendor/status-go | 2 +- 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/resources/node-config.json b/resources/node-config.json index 72f039c3b6..c6fec1a057 100644 --- a/resources/node-config.json +++ b/resources/node-config.json @@ -75,6 +75,8 @@ "WalletConfig": { "Enabled": true, "OpenseaAPIKey": "", + "RaribleMainnetAPIKey": "", + "RaribleTestnetAPIKey": "", "AlchemyAPIKeys": {}, "InfuraAPIKey": "", "InfuraAPIKeySecret": "" diff --git a/src/app_service/common/network_constants.nim b/src/app_service/common/network_constants.nim index 6f0be881b7..81bca0fffe 100644 --- a/src/app_service/common/network_constants.nim +++ b/src/app_service/common/network_constants.nim @@ -225,6 +225,8 @@ var NODE_CONFIG* = %* { "WalletConfig": { "Enabled": true, "OpenseaAPIKey": OPENSEA_API_KEY_RESOLVED, + "RaribleMainnetAPIKey": RARIBLE_MAINNET_API_KEY_RESOLVED, + "RaribleTestnetAPIKey": RARIBLE_TESTNET_API_KEY_RESOLVED, "AlchemyAPIKeys": %* { "1": ALCHEMY_ETHEREUM_MAINNET_TOKEN_RESOLVED, "5": ALCHEMY_ETHEREUM_GOERLI_TOKEN_RESOLVED, diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 941632ca4a..7c99fa045f 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -384,6 +384,8 @@ QtObject: result["WalletConfig"] = %* { "LoadAllTransfers": true, "OpenseaAPIKey": OPENSEA_API_KEY_RESOLVED, + "RaribleMainnetAPIKey": RARIBLE_MAINNET_API_KEY_RESOLVED, + "RaribleTestnetAPIKey": RARIBLE_TESTNET_API_KEY_RESOLVED, "InfuraAPIKey": INFURA_TOKEN_RESOLVED, "InfuraAPIKeySecret": INFURA_TOKEN_SECRET_RESOLVED, "AlchemyAPIKeys": %* { diff --git a/src/constants.nim b/src/constants.nim index 16a566ac22..10e94a373a 100644 --- a/src/constants.nim +++ b/src/constants.nim @@ -56,5 +56,7 @@ let ALCHEMY_OPTIMISM_GOERLI_TOKEN_RESOLVED* = desktopConfig.alchemyOptimismGoerliToken ALCHEMY_OPTIMISM_SEPOLIA_TOKEN_RESOLVED* = desktopConfig.alchemyOptimismSepoliaToken OPENSEA_API_KEY_RESOLVED* = desktopConfig.openseaApiKey + RARIBLE_MAINNET_API_KEY_RESOLVED* = desktopConfig.raribleMainnetApiKey + RARIBLE_TESTNET_API_KEY_RESOLVED* = desktopConfig.raribleTestnetApiKey TENOR_API_KEY_RESOLVED* = desktopConfig.tenorApiKey WALLET_CONNECT_PROJECT_ID* = BUILD_WALLET_CONNECT_PROJECT_ID diff --git a/src/env_cli_vars.nim b/src/env_cli_vars.nim index 438474826d..fe0cea6f92 100644 --- a/src/env_cli_vars.nim +++ b/src/env_cli_vars.nim @@ -14,6 +14,8 @@ const BASE_NAME_INFURA_TOKEN = "INFURA_TOKEN" const BASE_NAME_INFURA_TOKEN_SECRET = "INFURA_TOKEN_SECRET" const BASE_NAME_POKT_TOKEN = "POKT_TOKEN" const BASE_NAME_OPENSEA_API_KEY = "OPENSEA_API_KEY" +const BASE_NAME_RARIBLE_MAINNET_API_KEY = "RARIBLE_MAINNET_API_KEY" +const BASE_NAME_RARIBLE_TESTNET_API_KEY = "RARIBLE_TESTNET_API_KEY" const BASE_NAME_ALCHEMY_ETHEREUM_MAINNET_TOKEN = "ALCHEMY_ETHEREUM_MAINNET_TOKEN" const BASE_NAME_ALCHEMY_ETHEREUM_GOERLI_TOKEN = "ALCHEMY_ETHEREUM_GOERLI_TOKEN" const BASE_NAME_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN = "ALCHEMY_ETHEREUM_SEPOLIA_TOKEN" @@ -39,6 +41,8 @@ const DEFAULT_POKT_TOKEN = "849214fd2f85acead08f5184" BUILD_POKT_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_POKT_TOKEN, DEFAULT_POKT_TOKEN) const BUILD_OPENSEA_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_OPENSEA_API_KEY) +const BUILD_RARIBLE_MAINNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_MAINNET_API_KEY) +const BUILD_RARIBLE_TESTNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_TESTNET_API_KEY) const BUILD_ALCHEMY_ETHEREUM_MAINNET_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_MAINNET_TOKEN) const BUILD_ALCHEMY_ETHEREUM_GOERLI_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_GOERLI_TOKEN) const BUILD_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN) @@ -107,6 +111,16 @@ type StatusDesktopConfig = object desc: "Sets open sea api key" name: $BASE_NAME_OPENSEA_API_KEY abbr: "open-sea-api-key" .}: string + raribleMainnetApiKey* {. + defaultValue: BUILD_RARIBLE_MAINNET_API_KEY + desc: "Sets rarible mainnet api key" + name: $BASE_NAME_RARIBLE_MAINNET_API_KEY + abbr: "rarible-mainnet-api-key" .}: string + raribleTestnetApiKey* {. + defaultValue: BUILD_RARIBLE_TESTNET_API_KEY + desc: "Sets rarible testnet api key" + name: $BASE_NAME_RARIBLE_TESTNET_API_KEY + abbr: "rarible-testnet-api-key" .}: string alchemyEthereumMainnetToken* {. defaultValue: BUILD_ALCHEMY_ETHEREUM_MAINNET_TOKEN desc: "Sets alchemy ethereum mainnet token" diff --git a/vendor/status-go b/vendor/status-go index 31d0782f66..8a84c858a8 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 31d0782f6678c275a9009139c819bfda51482e21 +Subproject commit 8a84c858a87324013a8a6f2fd75bee1cfc0892b6