Skip to content

chore(payments): Add the new released connectors#129

Merged
Quentin-David-24 merged 4 commits into
mainfrom
chore/add-new-payments-connectors
Apr 24, 2026
Merged

chore(payments): Add the new released connectors#129
Quentin-David-24 merged 4 commits into
mainfrom
chore/add-new-payments-connectors

Conversation

@Quentin-David-24

@Quentin-David-24 Quentin-David-24 commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Resolves EN-147

@Quentin-David-24 Quentin-David-24 requested a review from a team as a code owner March 18, 2026 18:55
@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Quentin-David-24 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 21 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 21 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 929d7480-f7c1-4d2a-9e9a-9200fc946032

📥 Commits

Reviewing files that changed from the base of the PR and between 1616a1c and 0015c1d.

📒 Files selected for processing (9)
  • cmd/payments/connectors/configs/getconfig.go
  • cmd/payments/connectors/install/coinbaseprime.go
  • cmd/payments/connectors/install/fireblocks.go
  • cmd/payments/connectors/install/increase.go
  • cmd/payments/connectors/install/plaid.go
  • cmd/payments/connectors/install/powens.go
  • cmd/payments/connectors/install/tink.go
  • cmd/payments/connectors/internal/connectors.go
  • cmd/payments/versions/versions.go

Walkthrough

Adds CLI commands and controllers to install and update configurations for six payment connectors (Fireblocks, Coinbase Prime, Increase, Powens, Tink, Plaid). Implements stores, controllers, command wiring, config file parsing, API calls (V3InstallConnector / V3UpdateConnectorConfig), rendering helpers, and registry entries.

Changes

Cohort / File(s) Summary
Config Update Commands
cmd/payments/connectors/configs/coinbaseprime.go, cmd/payments/connectors/configs/fireblocks.go, cmd/payments/connectors/configs/increase.go, cmd/payments/connectors/configs/plaid.go, cmd/payments/connectors/configs/powens.go, cmd/payments/connectors/configs/tink.go
Added store and controller types plus Cobra command creators for updating connector configs. Flow: validate connector-id → request approval → read/unmarshal JSON config → call V3UpdateConnectorConfig → handle non-2xx and errors → persist success and render message.
Config Update Root
cmd/payments/connectors/configs/root.go
Wires new update-config subcommands by appending newUpdateFireblocksCommand(), newUpdateCoinbaseprimeCommand(), newUpdateIncreaseCommand(), newUpdatePowensCommand(), newUpdateTinkCommand(), newUpdatePlaidCommand().
Install Commands
cmd/payments/connectors/install/coinbaseprime.go, cmd/payments/connectors/install/fireblocks.go, cmd/payments/connectors/install/increase.go, cmd/payments/connectors/install/plaid.go, cmd/payments/connectors/install/powens.go, cmd/payments/connectors/install/tink.go
Added stores, controllers, and Cobra commands to install connectors. Flow: load profile/authenticate → enforce PaymentsVersion constraints → read/unmarshal JSON config → request approval → call Payments.V3.InstallConnector → handle non-2xx and errors → update store and render success with connector details.
Install Root
cmd/payments/connectors/install/root.go
Appends NewFireblocksCommand(), NewCoinbaseprimeCommand(), NewIncreaseCommand(), NewPowensCommand(), NewTinkCommand(), NewPlaidCommand() to install command children.
Connector Registry
cmd/payments/connectors/internal/connectors.go
Adds constants for fireblocks, coinbaseprime, increase, powens, tink, plaid and includes them in AllConnectors.
Get Config Rendering
cmd/payments/connectors/configs/getconfig.go
Extended V3 config rendering switch to dispatch newly added connectors to their Display...ConfigV3 functions.
Views / Renderers
cmd/payments/connectors/views/fireblocks.go, .../coinbaseprime.go, .../increase.go, .../plaid.go, .../powens.go, .../tink.go, (and removal in .../atlar.go)
Added display helpers for each new connector (Build and render pterm tables). Removed fmt import and PageSize row from Atlar view.

Sequence Diagram

sequenceDiagram
    actor User
    participant CLI
    participant Controller
    participant Auth
    participant StackClient
    participant PaymentsAPI
    participant Store
    participant Renderer

    User->>CLI: run install/update command with file + flags
    CLI->>Controller: Run(args, flags)
    Controller->>Auth: Load profile & authenticate
    Auth-->>Controller: profile
    Controller->>StackClient: Init client with profile
    StackClient-->>Controller: client ready
    Controller->>Controller: validate connector-id / version / args
    Controller->>User: request approval
    User->>Controller: approve / deny
    alt approved
        Controller->>Controller: read & parse JSON config file
        Controller->>PaymentsAPI: InstallConnector / UpdateConnectorConfig (config)
        PaymentsAPI-->>Controller: response (200-299 / error)
        alt success
            Controller->>Store: set Success=true, record ConnectorID/name
            Store-->>Controller: persisted
            Controller->>Renderer: Render success message
            Renderer-->>User: display confirmation
        else failure
            Controller-->>User: return API error
        end
    else denied
        Controller-->>User: return ErrMissingApproval
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰
Six connectors scamper into view,
JSON in paws, their configs new,
Install or update—CLI delight,
Approvals asked before taking flight,
I hop and cheer: the commands work right!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding new released payment connectors to the codebase, which aligns with the changeset.
Description check ✅ Passed The description references issue EN-147 which is related to adding new payment connectors, matching the changeset content.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-new-payments-connectors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmd/payments/connectors/install/coinbaseprime.go`:
- Around line 75-77: The version check in coinbaseprime.go uses
c.PaymentsVersion < versions.V3 but the error text says ">= v3.2.0", causing a
mismatch; update the check or the message to be consistent: either change the
error string in the conditional that references c.PaymentsVersion and
versions.V3 to state ">= v3.0.0" to match versions.V3, or if the connector truly
requires v3.2.0 introduce/use a new finer-grained version constant (e.g.,
versions.V3_2 or similar) and replace versions.V3 with that constant in the same
conditional so the runtime check matches the "v3.2.0" message. Ensure you modify
the conditional and its fmt.Errorf text consistently.

In `@cmd/payments/connectors/install/tink.go`:
- Around line 75-77: The version check uses c.PaymentsVersion < versions.V3 but
the error text says ">= v3.1.0", causing a mismatch; update the check or message
to be consistent: either change the error string in the tink connector (and
similarly in plaid, powens, increase) to reflect the actual minimum
(v3.0.0-rc.1) referenced by versions.V3, or add and use a new constant (e.g.,
versions.V3_1) and compare c.PaymentsVersion < versions.V3_1 to enforce v3.1.0;
adjust the fmt.Errorf text to match whichever minimum you enforce.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6d0125d-aa0c-4d00-9f53-a8eef1aeeba1

📥 Commits

Reviewing files that changed from the base of the PR and between 1957265 and 804bcf0.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (15)
  • cmd/payments/connectors/configs/coinbaseprime.go
  • cmd/payments/connectors/configs/fireblocks.go
  • cmd/payments/connectors/configs/increase.go
  • cmd/payments/connectors/configs/plaid.go
  • cmd/payments/connectors/configs/powens.go
  • cmd/payments/connectors/configs/root.go
  • cmd/payments/connectors/configs/tink.go
  • cmd/payments/connectors/install/coinbaseprime.go
  • cmd/payments/connectors/install/fireblocks.go
  • cmd/payments/connectors/install/increase.go
  • cmd/payments/connectors/install/plaid.go
  • cmd/payments/connectors/install/powens.go
  • cmd/payments/connectors/install/root.go
  • cmd/payments/connectors/install/tink.go
  • cmd/payments/connectors/internal/connectors.go

Comment thread cmd/payments/connectors/install/coinbaseprime.go Outdated
Comment thread cmd/payments/connectors/install/tink.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cmd/payments/connectors/configs/getconfig.go (1)

228-239: Consider a renderer registry before this switch grows again.

These six cases keep renderV3 in lockstep with every provider-specific helper. A map[string]func(*cobra.Command, *shared.V3GetConnectorConfigResponse) error would make future connector additions declarative and reduce missed wiring.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/payments/connectors/configs/getconfig.go` around lines 228 - 239, Replace
the growing switch in getconfig.go that calls provider-specific helpers (e.g.,
views.DisplayFireblocksConfigV3, views.DisplayCoinbaseprimeConfigV3,
views.DisplayIncreaseConfigV3, views.DisplayPowensConfigV3,
views.DisplayTinkConfigV3, views.DisplayPlaidConfigV3) with a registry
map[string]func(*cobra.Command, *shared.V3GetConnectorConfigResponse) error
keyed by the connector constants (internal.FireblocksConnector,
internal.CoinbaseprimeConnector, etc.); look up the handler from the map using
the connector key and call it with (cmd, c.store.V3ConnectorConfig), falling
back to the existing default path if the key is missing—this makes renderV3
wiring declarative and avoids adding switch cases for each new connector.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmd/payments/connectors/views/fireblocks.go`:
- Around line 20-23: The output currently prints secrets verbatim (see tableData
appends for APIKey and PrivateKey in the Fireblocks config renderer); change the
renderer to omit or redact secret values before adding them to tableData (e.g.,
replace config.APIKey and config.PrivateKey with a redacted placeholder or
masked string) and keep non-secret fields (Endpoint, PollingPeriod via
fctl.StringPointerToString) unchanged so logs no longer leak live credentials.

---

Nitpick comments:
In `@cmd/payments/connectors/configs/getconfig.go`:
- Around line 228-239: Replace the growing switch in getconfig.go that calls
provider-specific helpers (e.g., views.DisplayFireblocksConfigV3,
views.DisplayCoinbaseprimeConfigV3, views.DisplayIncreaseConfigV3,
views.DisplayPowensConfigV3, views.DisplayTinkConfigV3,
views.DisplayPlaidConfigV3) with a registry map[string]func(*cobra.Command,
*shared.V3GetConnectorConfigResponse) error keyed by the connector constants
(internal.FireblocksConnector, internal.CoinbaseprimeConnector, etc.); look up
the handler from the map using the connector key and call it with (cmd,
c.store.V3ConnectorConfig), falling back to the existing default path if the key
is missing—this makes renderV3 wiring declarative and avoids adding switch cases
for each new connector.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 40f47622-3e89-440a-a922-7052cb3ea236

📥 Commits

Reviewing files that changed from the base of the PR and between 804bcf0 and 1616a1c.

📒 Files selected for processing (8)
  • cmd/payments/connectors/configs/getconfig.go
  • cmd/payments/connectors/views/atlar.go
  • cmd/payments/connectors/views/coinbaseprime.go
  • cmd/payments/connectors/views/fireblocks.go
  • cmd/payments/connectors/views/increase.go
  • cmd/payments/connectors/views/plaid.go
  • cmd/payments/connectors/views/powens.go
  • cmd/payments/connectors/views/tink.go
💤 Files with no reviewable changes (1)
  • cmd/payments/connectors/views/atlar.go

Comment thread cmd/payments/connectors/views/fireblocks.go
laouji
laouji previously approved these changes Mar 19, 2026

@laouji laouji left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dirty check is failing but otherwise looks good.

@Quentin-David-24 Quentin-David-24 enabled auto-merge (squash) April 24, 2026 08:19
@Quentin-David-24 Quentin-David-24 merged commit 05370f7 into main Apr 24, 2026
7 checks passed
@Quentin-David-24 Quentin-David-24 deleted the chore/add-new-payments-connectors branch April 24, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants