-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove peerDependency of toolkit (#560)
- Loading branch information
1 parent
ed5dc56
commit db34aef
Showing
6 changed files
with
46 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ckb-lumos/toolkit": patch | ||
--- | ||
|
||
remove peer dependencies in toolkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const test = require("ava"); | ||
const { normalizers } = require("../lib"); | ||
|
||
test("correct outPoint should pass validation", (t) => { | ||
const normalizedOutpoint = normalizers.NormalizeOutPoint({ | ||
txHash: `0x${"00".repeat(32)}`, | ||
index: "0x1", | ||
}); | ||
const expectedNormalizedIndex = new ArrayBuffer(4); | ||
const view = new Int32Array(expectedNormalizedIndex); | ||
view[0] = 1; | ||
|
||
t.deepEqual(normalizedOutpoint, { | ||
index: expectedNormalizedIndex, | ||
txHash: new ArrayBuffer(32), | ||
}); | ||
}); | ||
|
||
test("error outPoint should not pass validation", (t) => { | ||
t.throws(() => { | ||
normalizers.NormalizeOutPoint({ | ||
txHash: `0x${"00".repeat(32)}`, | ||
index: "0x", | ||
}); | ||
}); | ||
t.throws(() => { | ||
normalizers.NormalizeOutPoint({ | ||
txHash: `0x${"00".repeat(32)}`, | ||
index: "not a number", | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
db34aef
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.
🚀 New canary release:
0.0.0-canary-db34aef-20231013061434
db34aef
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.
Successfully deployed to the following URLs:
lumos-website – ./
lumos-website.vercel.app
lumos-website-magickbase.vercel.app
lumos-website-git-develop-magickbase.vercel.app