Skip to content

Commit 9293cc4

Browse files
committed
wip: update
1 parent 60ead41 commit 9293cc4

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

packages/neuron-ui/src/utils/perun-wallet-wrapper/verifier.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { PerunError } from "./error";
22
import { OpenChannelRequest } from "./perun-wallet";
3-
import { Allocation, Balances } from "./wire";
3+
import { Address, Allocation, Balances } from "./wire";
44

55
const TEMP_CHANNEL_ID_LENGTH = 32; // 32-byte array
66

77
export interface ValidOpenChannelRequest {
88
// The participant opening the channel.
9-
participant: Uint8Array;
9+
participant: Address | undefined;
1010
// Peers requested to participate in the channel.
11-
peers: Uint8Array[];
11+
peers: Address[];
1212
// Id of this channel proposal, can be used to match the request.
1313
proposalId: Uint8Array;
1414
// Duration of the challenge phase in seconds.

packages/neuron-wallet/src/controllers/perun.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default class PerunController {
139139
}),
140140
})
141141
const res = await PerunController.serviceClient
142-
.openChannel(params.me, params.peer, alloc, params.challengeDuration, new Uint8Array([5]))
142+
.openChannel(params.me, params.peer, alloc, params.challengeDuration, new Uint8Array(0))
143143
.catch(e => {
144144
logger.info('PerunController: openChannel-----error-----', e)
145145
return {

packages/neuron-wallet/src/services/perun/service-runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export class PerunServiceRunner {
116116

117117
// 处理这个,比如让用户通过请求??
118118
crypto.getRandomValues(nonceShare)
119+
// goto file:///./server/wallet-backend.ts#L40
119120
this.ipcReturn('openChannelResponse', {
120121
nonceShare,
121122
})

packages/neuron-wallet/src/utils/perun-wallet-wrapper/verifier.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { PerunError } from "./error";
22
import { OpenChannelRequest } from "./perun-wallet";
3-
import { Allocation, Balances } from "./wire";
3+
import { Address, Allocation, Balances } from "./wire";
44

55
const TEMP_CHANNEL_ID_LENGTH = 32; // 32-byte array
66

77
export interface ValidOpenChannelRequest {
88
// The participant opening the channel.
9-
participant: Uint8Array;
9+
participant: Address | undefined;
1010
// Peers requested to participate in the channel.
11-
peers: Uint8Array[];
11+
peers: Address[];
1212
// Id of this channel proposal, can be used to match the request.
1313
proposalId: Uint8Array;
1414
// Duration of the challenge phase in seconds.

0 commit comments

Comments
 (0)