Skip to content

[PLA-2346] Platform Cloud v3 Support#102

Merged
Bradez merged 36 commits into3.xfrom
feature/PLA-2346/wallet-daemon-v3-support
Mar 23, 2026
Merged

[PLA-2346] Platform Cloud v3 Support#102
Bradez merged 36 commits into3.xfrom
feature/PLA-2346/wallet-daemon-v3-support

Conversation

@JayPavlina
Copy link
Copy Markdown

@JayPavlina JayPavlina commented Mar 16, 2026

PR Type

Enhancement


Description

  • Replace pending wallets with managed creations

  • Add v3 network and chain schema

  • Remove legacy wallet connection query


Diagram Walkthrough

flowchart LR
  A["Wallet daemon pending fetch"]
  B["GetPendingManagedWalletCreations query"]
  C["v3 schema enums and result types"]
  D["External IDs and next cursor"]
  A -- "uses" --> B
  B -- "depends on" --> C
  B -- "returns" --> D
Loading

File Walkthrough

Relevant files
Enhancement
graphql.rs
Rename generated query for managed creations                         

src/graphql.rs

  • Updates the generated GraphQL binding to use
    graphql/get_pending_managed_wallet_creations.graphql.
  • Renames the query struct from GetPendingWallets to
    GetPendingManagedWalletCreations.
+2/-2     
wallet.rs
Wire wallet job to new query                                                         

src/wallet.rs

  • Switches GraphQL imports to get_pending_managed_wallet_creations and
    GetPendingManagedWalletCreations.
  • Updates pending wallet request construction to use the new query type.
+2/-2     
get_pending_managed_wallet_creations.graphql
Add managed wallet creations GraphQL query                             

graphql/get_pending_managed_wallet_creations.graphql

  • Adds the new GetPendingManagedWalletCreations GraphQL operation.
  • Introduces required network and chain inputs.
  • Requests externalId items and nextCursor pagination data.
+13/-0   
get_pending_wallets.graphql
Remove deprecated pending wallets query                                   

graphql/get_pending_wallets.graphql

  • Removes the legacy GetPendingWallets query definition.
  • Drops the old connection-based response shape with edges and pageInfo.
+0/-24   
schema.graphql
Update schema for v3 wallet lookup                                             

graphql/schema.graphql

  • Adds Network and Chain enums for the new query contract.
  • Defines WalletData and GetPendingManagedWalletCreationsResult response
    types.
  • Replaces GetPendingWallets with GetPendingManagedWalletCreations in
    Query.
  • Removes obsolete wallet connection types tied to the old API.
+20/-12 

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Query mismatch

The wallet fetch still builds variables using the removed pending-wallet query shape, while the new managed-creation query requires different variable names and mandatory filters. Verify the generated GraphQL types, request payload, and compile path were updated consistently.

let res = GetPendingManagedWalletCreations::build_query(get_pending_wallets::Variables {
    after: None,
    first: Some(ACCOUNT_PAGE_SIZE),
});
Pagination change

The API contract changed from connection-style pagination to a data list plus nextCursor. Confirm the wallet polling loop now consumes nextCursor correctly so additional pages are not skipped.

query GetPendingManagedWalletCreations($network: Network!, $chain: Chain!, $limit: Int! = 25, $cursor: String) {
  result: GetPendingManagedWalletCreations(
    network: $network
    chain: $chain
    limit: $limit
    cursor: $cursor
  ) {
    data {
      externalId
    }
    nextCursor
  }

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Match new query variables

This request is still being built with the old query's Variables type and old
pagination fields, so it no longer matches GetPendingManagedWalletCreations. Switch
to get_pending_managed_wallet_creations::Variables and pass the required network,
chain, limit, and cursor inputs expected by the new GraphQL operation.

src/wallet.rs [114-117]

-let res = GetPendingManagedWalletCreations::build_query(get_pending_wallets::Variables {
-    after: None,
-    first: Some(ACCOUNT_PAGE_SIZE),
-});
+let res = GetPendingManagedWalletCreations::build_query(
+    get_pending_managed_wallet_creations::Variables {
+        network: /* derive from job/config */,
+        chain: /* derive from job/config */,
+        limit: ACCOUNT_PAGE_SIZE,
+        cursor: None,
+    },
+);
Suggestion importance[1-10]: 9

__

Why: GetPendingManagedWalletCreations is being built with get_pending_wallets::Variables and the old after/first fields, which no longer match the new GraphQL operation. This is a high-impact issue because src/wallet.rs will not compile or will construct the request incorrectly until it uses get_pending_managed_wallet_creations::Variables with the new required inputs.

High
Drop top-level alias

Aliasing the top-level field to result changes the generated response shape for the
Rust client. If the consumer code was only updated for the query rename, this alias
will still break field access, so remove it unless every response reader was updated
to use result.

graphql/get_pending_managed_wallet_creations.graphql [1-13]

 query GetPendingManagedWalletCreations($network: Network!, $chain: Chain!, $limit: Int! = 25, $cursor: String) {
-  result: GetPendingManagedWalletCreations(
+  GetPendingManagedWalletCreations(
     network: $network
     chain: $chain
     limit: $limit
     cursor: $cursor
   ) {
     data {
       externalId
     }
     nextCursor
   }
 }
Suggestion importance[1-10]: 4

__

Why: The alias to result does change the generated Rust response field name, so this can break downstream access if callers still expect the unaliased field. However, the alias is valid GraphQL and the diff does not show any response-reading code, so the issue is plausible but only moderately supported by the PR context.

Low

@Bradez Bradez marked this pull request as ready for review March 23, 2026 11:02
@Bradez Bradez changed the base branch from master to 3.x March 23, 2026 11:04
@Bradez Bradez changed the title PLA-2346: Platform Cloud v3 Support [PLA-2346] Platform Cloud v3 Support Mar 23, 2026
@Bradez Bradez merged commit 505f349 into 3.x Mar 23, 2026
7 checks passed
@Bradez Bradez deleted the feature/PLA-2346/wallet-daemon-v3-support branch March 23, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants