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

Use new render function in the CLI #4880

Merged
merged 4 commits into from Apr 10, 2024
Merged

Use new render function in the CLI #4880

merged 4 commits into from Apr 10, 2024

Conversation

mat-if
Copy link
Contributor

@mat-if mat-if commented Apr 8, 2024

Summary

Use the new currency render function in the CLI. See #4879 for more information about that function

Testing Plan

Manual testing

Documentation

N/A

Breaking Change

N/A

confirmations: flags.confirmations,
})
).content

const assetId = response.content.assetId
const assetName = renderAssetName(isNativeIdentifier(assetId) ? '$IRON' : assetId, {
let nameToRender
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should re-use this functionality in CurrencyUtils?

@@ -40,11 +40,17 @@ export async function promptCurrency(options: {
if (options.balance) {
Copy link
Member

Choose a reason for hiding this comment

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

We should also be changing CurrencyUtils.decodeIronTry(input)

@@ -124,9 +124,13 @@ export async function selectAsset(
const choices = balances.map((balance) => {
Copy link
Member

Choose a reason for hiding this comment

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

We should

  • give verified status when selecting an asset
  • put verified assets at top of list

(can do in future PR)

@@ -116,13 +116,10 @@ export class PostCommand extends IronfishCommand {
spending += output.note.value()
}

const renderedSpending = CurrencyUtils.render(spending, true)
Copy link
Member

Choose a reason for hiding this comment

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

Remember to change this command to not just sum up all outputs as if they are IRON. Filed a ticket for later

@mat-if mat-if merged commit de67e0b into staging Apr 10, 2024
8 of 9 checks passed
@mat-if mat-if deleted the mat/cli-render branch April 10, 2024 20:00
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.

None yet

2 participants