Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

feat: add select to atom #183

Merged
merged 1 commit into from
Aug 9, 2022
Merged

feat: add select to atom #183

merged 1 commit into from
Aug 9, 2022

Conversation

harrysolovay
Copy link
Contributor

Enables the following, for instance:

const idx = C
  .readEntry(C.polkadot, "Staking", "ActiveEra", [])
  .select("value")
  .select("index");

Cleaner than...

const idx = C.select(
  C.select(
    C.readEntry(C.polkadot, "Staking", "ActiveEra", []),
    "value"
  ),
  "index",
);

@harrysolovay harrysolovay merged commit 3fcd111 into main Aug 9, 2022
@harrysolovay harrysolovay deleted the select-on-atom branch August 9, 2022 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant