Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: makeProposal return created proposal ID #486

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

peterpeterparker
Copy link
Member

Motivation

makeProposal returns currently void which is a bit inconvenient if the caller needs to know which proposal was created which happens to be the case in the small proof of concept I was developing.

Therefore this PR extends the function to return the potential ID of the proposal that was created.

Notes

Given the fact that the answer of the Governance canister is a variant I hesitated between returning Promise<bigint | undefined> or {success: boolean; proposalId?: bigint}. Given the fact that there was no use cases where `success: false^ would be set, I opted for the first simple solution.

Changes

  • return Command_1 for manageNeuron
  • return the proposal ID for makeProposal
  • make other functions that uses manageNeuron continue returning void

@peterpeterparker peterpeterparker added the enhancement New feature or request label Nov 26, 2023
Copy link
Contributor

github-actions bot commented Nov 26, 2023

size-limit report 📦

Path Size
@dfinity/ckbtc 6.88 KB (0%)
@dfinity/cmc 1.01 KB (0%)
@dfinity/ledger-icrc 2.92 KB (0%)
@dfinity/ledger-icp 14.41 KB (0%)
@dfinity/nns 33.85 KB (+0.07% 🔺)
@dfinity/nns-proto 76.3 KB (0%)
@dfinity/sns 15.04 KB (0%)
@dfinity/utils 4.14 KB (0%)
@dfinity/ic-management 1.94 KB (0%)

Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

Thank you!

@peterpeterparker peterpeterparker merged commit 5765036 into main Nov 28, 2023
12 checks passed
@peterpeterparker peterpeterparker deleted the feat/make-proposal branch November 28, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants