Skip to content

Commit a549544

Browse files
committed
update rocketpool cmds in AppService to support v.1.18.1 release + code cleanup
1 parent c44a594 commit a549544

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

build/ui/src/services/AppService.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { CanRegisterNode } from "../types/CanRegisterNode";
55
import { NodeSync } from "../types/NodeSync";
66
import { NetworkRplPrice } from "../types/NetworkRplPrice";
77
import { MinipoolStatus } from "../types/MinipoolStatus";
8-
import { NodeCanRegister } from "../types/NodeCanRegister";
98
import { TxResponse } from "../types/TxResponse";
109
import { WaitResponse } from "../types/WaitResponse";
1110
import { NodeCanSetWithdrawalAddress } from "../types/NodeCanSetWithdrawalAddress";
@@ -101,12 +100,6 @@ export class AppService {
101100
});
102101
return response.data;
103102
}
104-
public async getNodeCanRegister(): Promise<NodeCanRegister> {
105-
const response = await this.api.post(`/api/v1/rocketpool-command`, {
106-
cmd: `node can-register Etc/UTC`,
107-
});
108-
return response.data.canRegister;
109-
}
110103
public async nodeRegister(): Promise<TxResponse> {
111104
const response = await this.api.post(`/api/v1/rocketpool-command`, {
112105
cmd: `node register Etc/UTC`,
@@ -115,13 +108,13 @@ export class AppService {
115108
}
116109
public async getNodeCanSetWithdrawalAddress(address: string): Promise<NodeCanSetWithdrawalAddress> {
117110
const response = await this.api.post(`/api/v1/rocketpool-command`, {
118-
cmd: `node can-set-withdrawal-address ${address} yes`,
111+
cmd: `node can-set-primary-withdrawal-address ${address} yes`,
119112
});
120113
return response.data;
121114
}
122115
public async nodeSetWithdrawalAddress(address: string): Promise<TxResponse> {
123116
const response = await this.api.post(`/api/v1/rocketpool-command`, {
124-
cmd: `node set-withdrawal-address ${address} yes`,
117+
cmd: `node set-primary-withdrawal-address ${address} yes`,
125118
});
126119
return response.data;
127120
}
@@ -173,14 +166,14 @@ export class AppService {
173166
public async canDeposit(ethPool: number, nodeFee: number): Promise<CanDeposit> {
174167
const amount = toWei(ethPool);
175168
const response = await this.api.post(`/api/v1/rocketpool-command`, {
176-
cmd: `node can-deposit ${amount} ${nodeFee} 0`,
169+
cmd: `node can-deposit ${amount} ${nodeFee} 0 false`,
177170
});
178171
return response.data;
179172
}
180173
public async nodeDeposit(ethPool: number, nodeFee: number, useCreditBalance: boolean): Promise<DepositResponse> {
181174
const amount = toWei(ethPool);
182175
const response = await this.api.post(`/api/v1/rocketpool-command`, {
183-
cmd: `node deposit ${amount} ${nodeFee} 0 ${useCreditBalance} true`,
176+
cmd: `node deposit ${amount} ${nodeFee} 0 ${useCreditBalance} false true`,
184177
});
185178
return response.data;
186179
}

build/ui/src/types/NodeCanRegister.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)