@@ -60,15 +60,13 @@ export function sendMessageMainnet({ processId, wallet, tags, data }, spinner) {
60
60
const { request } = setupMainnet ( wallet )
61
61
const submitRequest = fromPromise ( request )
62
62
const params = {
63
- Type : 'Message' ,
63
+ type : 'Message' ,
64
64
65
65
method : 'POST' ,
66
- ...tags . filter ( t => t . name !== 'device' ) . reduce ( ( a , t ) => assoc ( t . name , t . value , a ) , { } ) ,
66
+ ...tags . reduce ( ( a , t ) => assoc ( t . name , t . value , a ) , { } ) ,
67
67
'data-protocol' : 'ao' ,
68
68
variant : 'ao.N.1' ,
69
69
target : processId ,
70
- "accept-bundle" : "true" ,
71
- // "accept-codec": "[email protected] ",
72
70
"signing-format" : "ANS-104"
73
71
}
74
72
// set data if needed
@@ -144,17 +142,16 @@ export function spawnProcessMainnet({ wallet, src, tags, data, isHyper }) {
144
142
const params = {
145
143
path : '/push' ,
146
144
method : 'POST' ,
147
- Type : 'Process' ,
145
+ type : 'Process' ,
148
146
149
147
'scheduler-device' :
'[email protected] ' ,
150
148
'push-device' :
'[email protected] ' ,
151
149
'execution-device' :
'[email protected] ' ,
152
150
'data-protocol' : 'ao' ,
153
151
variant : 'ao.N.1' ,
152
+ // ...tags.reduce((a, t) => assoc(t.name.toLowerCase(), t.value, a), {}),
154
153
...tags . reduce ( ( a , t ) => assoc ( t . name , t . value , a ) , { } ) ,
155
154
'aos-version' : pkg . version ,
156
- 'accept-bundle' : 'true' ,
157
- 'codec-device' :
'[email protected] ' ,
158
155
'signing-format' : 'ANS-104'
159
156
}
160
157
if ( data ) {
@@ -219,22 +216,20 @@ export async function liveMainnet(id, watch) {
219
216
try {
220
217
isJobRunning = true ;
221
218
// Get the current slot
222
- const currentSlotPath = `/${ id } [email protected] /slot/current/body/[email protected] ` // LIVE PARAMS
219
+ const currentSlotPath = `/${ id } [email protected] /slot/current` // LIVE PARAMS
223
220
const currentSlotParams = {
224
221
path : currentSlotPath ,
225
222
method : 'POST' ,
226
223
227
224
'data-protocol' : 'ao' ,
228
225
variant : 'ao.N.1' ,
229
226
'aos-version' : pkg . version ,
230
- signingFormat : 'ANS-104' ,
231
- "accept-bundle" : "true" ,
232
- "accept-codec" :
"[email protected] "
227
+ 'signing-format' : 'ANS-104'
233
228
}
234
229
const currentSlot = await request ( currentSlotParams )
235
230
. then ( res => res . body )
236
- . then ( JSON . parse )
237
- . then ( res => res . body )
231
+ // .then(JSON.parse)
232
+ // .then(res => res.body)
238
233
239
234
if ( isNaN ( cursor ) ) {
240
235
cursor = currentSlot + 1
@@ -252,9 +247,7 @@ export async function liveMainnet(id, watch) {
252
247
'push-device' :
'[email protected] ' ,
253
248
variant : 'ao.N.1' ,
254
249
'aos-version' : pkg . version ,
255
- signingFormat : 'ANS-104' ,
256
- "accept-bundle" : "true" ,
257
- "accept-codec" :
"[email protected] "
250
+ 'signing-format' : 'ANS-104' ,
258
251
}
259
252
const results = await request ( params )
260
253
. then ( res => res . body )
@@ -451,13 +444,11 @@ export async function handleNodeTopup(jwk, insufficientBalance) {
451
444
'data-protocol' : 'ao' ,
452
445
variant : 'ao.N.1' ,
453
446
target : PAYMENT . subledger ,
454
- 'accept-bundle' : 'true' ,
455
- 'accept-codec' :
'[email protected] ' ,
456
- 'signingFormat' : 'ANS-104' ,
447
+ 'signing-format' : 'ANS-104' ,
457
448
action : 'Transfer' ,
458
- Recipient : walletAddress ,
459
- Route : ledgerAddress ,
460
- Quantity : sendQuantity
449
+ recipient : walletAddress ,
450
+ route : ledgerAddress ,
451
+ quantity : sendQuantity
461
452
}
462
453
463
454
const transferRes = await aoMainnet . request ( transferParams ) ;
0 commit comments