Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.104.0
v0.104.1
12 changes: 6 additions & 6 deletions packages/neuron-wallet/tests/services/monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,38 +119,38 @@ describe('base monitor', () => {
})
it('not living', async () => {
isLivingMock.mockResolvedValue(true).mockResolvedValueOnce(false)
monitor.startMonitor(100)
await monitor.startMonitor(100)
await wait(200)
expect(isLivingMock).toHaveBeenCalled()
expect(restartMock).toHaveBeenCalled()
})
it('isLiving timeout', async () => {
isLivingMock.mockImplementation(() => wait(200))
monitor.startMonitor(100)
await monitor.startMonitor(100)
await wait(200)
expect(isLivingMock).toHaveBeenCalled()
expect(restartMock).toHaveBeenCalledTimes(1)
})
it('not living wait restart', async () => {
isLivingMock.mockResolvedValue(true).mockResolvedValueOnce(false)
restartMock.mockImplementation(() => wait(400))
monitor.startMonitor(100)
await monitor.startMonitor(100)
await wait(800)
expect(isLivingMock).toHaveBeenCalled()
expect(restartMock).toHaveBeenCalledTimes(1)
})
it('start monitor with first', async () => {
isLivingMock.mockResolvedValue(true).mockResolvedValueOnce(false)
monitor.startMonitor(1000, true)
await monitor.startMonitor(1000, true)
await wait(500)
expect(isLivingMock).toHaveBeenCalled()
expect(restartMock).toHaveBeenCalled()
})
it('twice start monitor', async () => {
isLivingMock.mockReset()
isLivingMock.mockResolvedValue(true)
monitor.startMonitor(500)
monitor.startMonitor(500)
await monitor.startMonitor(500)
await monitor.startMonitor(500)
await wait(800)
expect(isLivingMock).toHaveBeenCalledTimes(1)
})
Expand Down
4 changes: 2 additions & 2 deletions scripts/download-ckb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function download_mercury_windows() {

function download_macos() {
# macOS
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-apple-darwin"
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-apple-darwin-portable"
cd $ROOT_DIR/packages/neuron-wallet/bin/mac

curl -O -L "https://github.com/nervosnetwork/ckb/releases/download/${CKB_VERSION}/${CKB_FILENAME}.zip"
Expand All @@ -101,7 +101,7 @@ function download_macos() {

function download_linux() {
# Linux
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-unknown-linux-gnu"
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-unknown-linux-gnu-portable"
cd $ROOT_DIR/packages/neuron-wallet/bin/linux

curl -O -L "https://github.com/nervosnetwork/ckb/releases/download/${CKB_VERSION}/${CKB_FILENAME}.tar.gz"
Expand Down