-
Notifications
You must be signed in to change notification settings - Fork 45
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
Better get balance #433
base: master
Are you sure you want to change the base?
Better get balance #433
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also see similar logic changes in at least 2-3 parts of utxo.ts
is there anyway to share logic?
b5922db
to
09d97ff
Compare
09d97ff
to
d92d198
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add some tests?
sdk/src/wallet/utxo.ts
Outdated
// if confirmed check if it contains ordinals | ||
childNode.val.cardinal = cardinalOutputsSet.has(OutPoint.toString(childNode.val)); | ||
} else { | ||
const response = await ordinalsClient.getInscriptionsFromOutPoint(childNode.val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the utxo is unconfirmed? Would the next line panic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it won't
curl -s -H "Accept: application/json" "https://ordinals-mainnet.gobob.xyz/output/9cd84b0d89695c732f42906e755894319f6afa1aa69fef0b9a0bc5974eed8ef9:2"
tests will be added once we agree on the final solution |
a4d0683
to
43f89ac
Compare
43f89ac
to
5ae9e5b
Compare
5ae9e5b
to
1cdf87b
Compare
bob/sdk/src/inscription.ts
Line 188 in 743d020
Explanation: build a tree structure
TreeNode
cardinal: false
).If output has all leaf nodes with
cardinal: true
-- confirmed (not containing ordinals) then output amount could be spent.