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: add value field to RuneUtxoBalance #61

Merged
merged 5 commits into from
May 14, 2024

Conversation

kyleo-o
Copy link
Contributor

@kyleo-o kyleo-o commented May 8, 2024

Add value field to RuneUtxoBalance

@@ -101,6 +101,7 @@ export type RuneSpentUtxoBalance = RuneUtxoBalance & { spentTxid: string };
export type RuneUtxoBalance = {
txid: string;
vout: number;
value?: number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be optional, there is always a value associated. Also, please rename to satValue, just to further disambiguate from amount that represents the rune count.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice suggestion

@@ -32,7 +32,7 @@ function isScriptPubKeyHexOpReturn(scriptPubKeyHex: string) {
export type UpdaterTx = {
txid: string;
vin: ({ txid: string; vout: number; txinwitness: string[] } | { coinbase: string })[];
vout: { scriptPubKey: { hex: string; address?: string } }[];
vout: { scriptPubKey: { hex: string; address?: string }, value?: number }[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note UpdaterTx is just a view of Tx from rpcclient of the fields needed, and value is a required field. Thus I'd make value required here too.

@summraznboi summraznboi merged commit 1966179 into me-foundation:main May 14, 2024
1 check passed
dcorral pushed a commit to ordzaar/runestone-lib that referenced this pull request Sep 10, 2024
* feat: add value field to RuneUtxoBalance

* fix: fix value to satValue in RuneUtxoBalance

* fix: fix test/updater.test.ts for utxoBalance

* fix: make value is a required field

* fix: fix update.test.ts for value

---------

Co-authored-by: KyleO_O <>
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