From 365cd2f6e4fdea3fc160b4f56032e8ab1b2dac4d Mon Sep 17 00:00:00 2001 From: Alexis Pentori Date: Wed, 10 Jan 2024 15:48:26 +0100 Subject: [PATCH] wallet-fetcher: wallet address as a secret and updating sync mode Signed-off-by: Alexis Pentori --- wallet-fetcher/metadata.yaml | 2 +- wallet-fetcher/sample_files/btc-wallet.json | 12 ++++++++++++ wallet-fetcher/sample_files/configured_catalog.json | 8 ++++---- wallet-fetcher/source_wallet_fetcher/spec.yaml | 3 ++- wallet-fetcher/source_wallet_fetcher/stream.py | 1 + 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 wallet-fetcher/sample_files/btc-wallet.json diff --git a/wallet-fetcher/metadata.yaml b/wallet-fetcher/metadata.yaml index 33d97e2..78c2306 100644 --- a/wallet-fetcher/metadata.yaml +++ b/wallet-fetcher/metadata.yaml @@ -10,7 +10,7 @@ data: connectorSubtype: api connectorType: source definitionId: 1e55cfe0-f591-4281-9a20-18d89d45f685 - dockerImageTag: 0.2.0 + dockerImageTag: 0.3.0 dockerRepository: harbor.status.im/status-im/airbyte/wallet-fetcher githubIssueLabel: source-wallet-fetcher icon: icon.svg diff --git a/wallet-fetcher/sample_files/btc-wallet.json b/wallet-fetcher/sample_files/btc-wallet.json new file mode 100644 index 0000000..6dfff8a --- /dev/null +++ b/wallet-fetcher/sample_files/btc-wallet.json @@ -0,0 +1,12 @@ +{ + "wallets": [ + { + "address": "bc1qcm0frkpfhsem5rdx9c4qjzeet038xhyscfgtcq", + "name": "test-wallet-btc", + "blockchain": [ + "BTC" + ], + "tags": "EOA,Stacking" + } + ] +} diff --git a/wallet-fetcher/sample_files/configured_catalog.json b/wallet-fetcher/sample_files/configured_catalog.json index 7dc31a3..f0c9110 100644 --- a/wallet-fetcher/sample_files/configured_catalog.json +++ b/wallet-fetcher/sample_files/configured_catalog.json @@ -8,10 +8,10 @@ "type": "object" }, "supported_sync_modes": [ - "full_refresh" + "full_refresh", "incremental" ] }, - "sync_mode": "full_refresh", + "sync_mode": "incremental", "destination_sync_mode": "overwrite" }, { @@ -22,10 +22,10 @@ "type": "object" }, "supported_sync_modes": [ - "full_refresh" + "full_refresh", "incremental" ] }, - "sync_mode": "full_refresh", + "sync_mode": "incremental", "destination_sync_mode": "overwrite" } ] diff --git a/wallet-fetcher/source_wallet_fetcher/spec.yaml b/wallet-fetcher/source_wallet_fetcher/spec.yaml index 81b4d1b..bbc5f3e 100644 --- a/wallet-fetcher/source_wallet_fetcher/spec.yaml +++ b/wallet-fetcher/source_wallet_fetcher/spec.yaml @@ -5,6 +5,7 @@ connectionSpecification: type: object required: - wallets + additionalProperties: true properties: wallets: title: Wallets @@ -12,12 +13,12 @@ connectionSpecification: type: array items: type: object - additionalProperties: true properties: address: title: Address type: string description: Address of the wallet + airbyte_secret: true name: title: Name type: string diff --git a/wallet-fetcher/source_wallet_fetcher/stream.py b/wallet-fetcher/source_wallet_fetcher/stream.py index 87e8797..e0d42c2 100644 --- a/wallet-fetcher/source_wallet_fetcher/stream.py +++ b/wallet-fetcher/source_wallet_fetcher/stream.py @@ -45,6 +45,7 @@ class BitcoinToken(BlockchainStream): **kwargs ) -> Iterable[Mapping]: logger.info("Getting Bitcoin Balance information") + logger.info("Response %s", response.json()) bitcoin_data = response.json() yield { "wallet_name": stream_slice['name'],