Skip to content

Commit

Permalink
feat: disband
Browse files Browse the repository at this point in the history
  • Loading branch information
mindrunner committed Sep 8, 2024
1 parent 94ae07e commit d62d1d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main/basedbot/lib/sage/act/disband-fleet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { disbandedFleetToEscrowIx } from '../ix/disbanded-fleet-to-escrow'
import { getFleetShips } from '../state/get-fleet-ships'
import { getStarbasePlayer } from '../state/starbase-player'
import { Player } from '../state/user-account'
import { getName } from '../util'

export const disbandFleet = async (
player: Player,
Expand Down Expand Up @@ -46,15 +47,14 @@ export const disbandFleet = async (
starbase,
starbasePlayer,
programs,
shipEscrowIndex,
shipEscrowIndex === -1 ? null : shipEscrowIndex,
disbandedFleetKey[0],
fleet.data.fleetShips,
fleetShipInfo.ship,
i,
fleetShipInfo.amount,
),
)
console.log('Pushed disbanded fleet to escrow instruction')
i += 1
}

Expand All @@ -66,6 +66,7 @@ export const disbandFleet = async (
fleet.data.fleetShips,
),
)
console.log(`Added ${ixs.length} ixs for disbanding fleet ${getName(fleet)}`)

Check failure on line 69 in src/main/basedbot/lib/sage/act/disband-fleet.ts

View workflow job for this annotation

GitHub Actions / lint

Replace ``Added·${ixs.length}·ixs·for·disbanding·fleet·${getName(fleet)}`` with `⏎········`Added·${ixs.length}·ixs·for·disbanding·fleet·${getName(fleet)}`,⏎····`

await sendAndConfirmInstructions(await ixReturnsToIxs(ixs, player.signer))
}
2 changes: 1 addition & 1 deletion src/main/basedbot/lib/sage/ix/disbanded-fleet-to-escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const disbandedFleetToEscrowIx = (
starbase: Starbase,
starbasePlayer: StarbasePlayer,
programs: StarAtlasPrograms,
shipEscrowIndex: number,
shipEscrowIndex: number | null,
disbandedFleet: PublicKey,
fleetShips: PublicKey,
shipKey: PublicKey,
Expand Down

0 comments on commit d62d1d6

Please sign in to comment.