@@ -201,28 +201,35 @@ async function main() {
201
201
}
202
202
203
203
{
204
- let proposalDeltaStr = toDaysStr ( selected . startMs , selected . endMs ) ;
205
- let voteDeltaStr = toDaysStr ( selected . startMs , selected . voteMs ) ;
204
+ let proposalDeltaStr = toDaysStr (
205
+ selected . start . startMs ,
206
+ selected . start . endMs ,
207
+ ) ;
208
+ let voteDeltaStr = toDaysStr ( selected . start . startMs , selected . start . voteMs ) ;
206
209
let paymentDeltaStr = toDaysStr (
207
- selected . superblockMs ,
208
- selected . superblockMs ,
210
+ selected . start . superblockMs ,
211
+ selected . end . superblockMs ,
209
212
) ;
210
213
let totalDash = cycleCount * dashAmount ;
211
214
212
215
console . log ( "" ) ;
213
216
console . log (
214
- `Proposal Period: ${ selected . startIso } - ${ selected . endIso } (~${ proposalDeltaStr } days)` ,
217
+ `Proposal Period: ${ selected . start . startIso } - ${ selected . end . endIso } (~${ proposalDeltaStr } days)` ,
215
218
) ;
216
219
console . log (
217
- `Vote Period: ${ selected . startIso } - ${ selected . voteIso } (~${ voteDeltaStr } days)` ,
220
+ `Vote Period: ${ selected . start . startIso } - ${ selected . end . voteIso } (~${ voteDeltaStr } days)` ,
218
221
) ;
219
222
console . log (
220
- `Payment Period: ${ selected . superblockIso } - ${ selected . superblockIso } (~${ paymentDeltaStr } days)` ,
223
+ `Payment Period: ${ selected . start . superblockIso } - ${ selected . end . superblockIso } (~${ paymentDeltaStr } days)` ,
221
224
) ;
222
225
console . log ( "" ) ;
223
226
console . log ( `Total Dash: ${ totalDash } = ${ dashAmount } x ${ cycleCount } ` ) ;
224
227
}
225
228
229
+ if ( ! proposalUrl ) {
230
+ return ;
231
+ }
232
+
226
233
/** @type {DashGov.GObjectData } */
227
234
let gobjData = DashGov . proposal . draftJson ( selected , {
228
235
name : proposalName ,
@@ -335,13 +342,13 @@ async function main() {
335
342
txid = await DashTx . getId ( txInfoSigned . transaction ) ;
336
343
console . log ( txid ) ;
337
344
338
- let txResult = await rpc . request ( "/" , {
339
- method : "sendrawtransaction" ,
340
- params : [ txInfoSigned . transaction ] ,
341
- } ) ;
342
- console . log ( "" ) ;
343
- console . log ( "Transaction sent:" ) ;
344
- console . log ( txResult ) ;
345
+ let txResult = await rpc . request ( "/" , {
346
+ method : "sendrawtransaction" ,
347
+ params : [ txInfoSigned . transaction ] ,
348
+ } ) ;
349
+ console . log ( "" ) ;
350
+ console . log ( "Transaction sent:" ) ;
351
+ console . log ( txResult ) ;
345
352
}
346
353
347
354
for ( ; ; ) {
0 commit comments