@@ -49,7 +49,8 @@ export const synapseStorage = {
4949 prepare : mock ( async ( ) => ( {
5050 transaction : null ,
5151 costs : {
52- rate : {
52+ rates : {
53+ perEpoch : 11n ,
5354 perMonth : 111n ,
5455 } ,
5556 depositNeeded : 222n ,
@@ -164,7 +165,7 @@ export const waitForCreateDataSet = mock(async () => ({
164165
165166export const uploadPiece = mock ( async ( ) => undefined )
166167export const findPiece = mock ( async ( ) => undefined )
167- export const calculate = mock ( ( ) => cid ( 'baga-calculated' ) )
168+ export const calculate = mock ( async ( ) => cid ( 'baga-calculated' ) )
168169
169170export const createDataSetAndAddPieces = mock ( async ( ) => ( {
170171 txHash : '0xdatasetupload' ,
@@ -192,13 +193,17 @@ export const terminateServiceSync = mock(async (_client: any, options: any) => {
192193} )
193194
194195export const getAccountSummary = mock ( async ( ) => ( {
196+ funds : 5n ,
195197 availableFunds : 1n ,
198+ debt : 0n ,
199+ lockupRatePerEpoch : 6n ,
200+ lockupRatePerMonth : 4n ,
196201 totalLockup : 2n ,
202+ totalFixedLockup : 7n ,
197203 totalRateBasedLockup : 3n ,
198- lockupRatePerMonth : 4n ,
199- funds : 5n ,
204+ runwayInEpochs : 120n ,
205+ grossCoverageInEpochs : 240n ,
200206 epoch : 100n ,
201- fundedUntilEpoch : 220n ,
202207} ) )
203208
204209export const getBlockNumber = mock ( async ( ) => 123n )
@@ -307,7 +312,8 @@ export function resetCommandMocks() {
307312 synapseStorage . prepare . mockImplementation ( async ( ) => ( {
308313 transaction : null ,
309314 costs : {
310- rate : {
315+ rates : {
316+ perEpoch : 11n ,
311317 perMonth : 111n ,
312318 } ,
313319 depositNeeded : 222n ,
@@ -338,7 +344,7 @@ export function resetCommandMocks() {
338344 } ) )
339345 uploadPiece . mockImplementation ( async ( ) => undefined )
340346 findPiece . mockImplementation ( async ( ) => undefined )
341- calculate . mockImplementation ( ( ) => cid ( 'baga-calculated' ) )
347+ calculate . mockImplementation ( async ( ) => cid ( 'baga-calculated' ) )
342348 createDataSetAndAddPieces . mockImplementation ( async ( ) => ( {
343349 txHash : '0xdatasetupload' ,
344350 statusUrl : 'https://provider.example/status' ,
@@ -363,13 +369,17 @@ export function resetCommandMocks() {
363369 }
364370 )
365371 getAccountSummary . mockImplementation ( async ( ) => ( {
372+ funds : 5n ,
366373 availableFunds : 1n ,
374+ debt : 0n ,
375+ lockupRatePerEpoch : 6n ,
376+ lockupRatePerMonth : 4n ,
367377 totalLockup : 2n ,
378+ totalFixedLockup : 7n ,
368379 totalRateBasedLockup : 3n ,
369- lockupRatePerMonth : 4n ,
370- funds : 5n ,
380+ runwayInEpochs : 120n ,
381+ grossCoverageInEpochs : 240n ,
371382 epoch : 100n ,
372- fundedUntilEpoch : 220n ,
373383 } ) )
374384 getBlockNumber . mockImplementation ( async ( ) => 123n )
375385 waitForTransactionReceipt . mockImplementation ( async ( ) => ( {
0 commit comments