-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor(sdk): update tests #895
Conversation
alexfreska
commented
Jan 18, 2025
•
edited
Loading
edited
- Updated test suites to pass with the changes introduced in feature(sdk): Add support for signing v2 transactions #873
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 5 Skipped Deployments
|
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
@n8maninger synced up the tests to work with the changes, two bits I couldn't figure out / or may require changes outside web
:
- 2 tests are returning the
account
as a byte array.
- "account": "1b6793e900df020dc9a43c6df5f5d10dc5793956d44831ca5bbfec659021b75e",
+ "account": Array [
+ 27,
+ 103,
+ 147,
+ 233,
+ 0,
+ 223,
+ 2,
+ 13,
+ 201,
+ 164,
+ 60,
+ 109,
+ 245,
+ 245,
+ 209,
+ 13,
+ 197,
+ 121,
+ 57,
+ 86,
+ 212,
+ 72,
+ 49,
+ 202,
+ 91,
+ 191,
+ 236,
+ 101,
+ 144,
+ 33,
+ 183,
+ 94,
+ ],
- getting the following error on the spendpolicy test:
● wallet › addressFromSpendPolicy › valid
expect(received).toBeUndefined()
Received: "json: cannot unmarshal string into Go value of type struct { Type string \"json:\\\"type\\\"\"; Policy json.RawMessage \"json:\\\"policy\\\"\" }"
120 | 'thresh(1, [above(100),pk(0x5e4bbc181bae781575a30fabdce472842d0373c12eafcd8013dba0cbf69e34e0)])'
121 | const { error, address } = sdk.wallet.addressFromSpendPolicy(spendPolicy)
> 122 | expect(error).toBeUndefined()
| ^
123 | expect(address).toEqual(
124 | '170bf8f730c072a881edf9be3c08d0491f23810f7344125444ebff4bd8855d98dd9159fe1cea'
125 | )
417cbe3
to
beef293
Compare
We don't use this format any more. It's just JSON now. Should be easier to build and consume: {
"type": "thresh",
"policy": {
"n": 1,
"of": [
{
"type": "above",
"policy": 100
},
{
"type": "pk",
"policy": "ed25519:5e4bbc181bae781575a30fabdce472842d0373c12eafcd8013dba0cbf69e34e0"
}
]
}
} |
beef293
to
a02ec96
Compare
If you update |
a02ec96
to
4a47b74
Compare
@n8maninger ok cool, all passing locally now, should be good. |
You can also update |
That was a lot of prefixes 😅 |
4a47b74
to
fc7ed22
Compare
fc7ed22
to
afada87
Compare