File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,10 @@ export function useColossus() {
400
400
401
401
const handleWithdrawAndReturn = async ( planets : Planet [ ] ) => {
402
402
/* sanity check */
403
+ if ( planets . length == 0 ) {
404
+ print ( `no rips found, returning...` )
405
+ return ;
406
+ }
403
407
const rips = planets . filter ( ( p ) => p . planetType == PlanetType . TRADING_POST ) ;
404
408
const confirmedPlanets = await makeConfirmedPlanets ( rips ) ;
405
409
await processAndReturnPlanets ( confirmedPlanets , [ ] ) ;
Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ export const useLeaderboard = () => {
35
35
// console.log('lb', officialLeaderboard.entries)
36
36
return colossus . playerCounter ( ) . then ( async count => {
37
37
const lb = [ ]
38
+ let totalScore = 0 ;
38
39
for ( let i = 0 ; i < Number ( count ) ; i ++ ) {
39
40
const address = await colossus . players ( i ) ;
40
41
const playerScore = await colossus . contributions ( address ) ;
41
42
const score = Number ( playerScore )
43
+ totalScore += score ;
42
44
// console.log(`addy ${address} score ${score}`);
43
45
lb . push ( { address, score, rank : 0 } )
44
46
}
You can’t perform that action at this time.
0 commit comments