Skip to content

Commit 759166c

Browse files
committed
chore(services/ocp): auto-number actions again with DSL
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 632ebee commit 759166c

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

services/opencode/src/main/kotlin/com/getcode/opencode/internal/network/api/intents/IntentWithdraw.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ internal class IntentWithdraw(
6161
if (fee != null) {
6262
add(
6363
ActionFeePayment.newInstance(
64-
index = 1,
6564
fee = fee,
6665
source = sourceCluster,
6766
)

services/opencode/src/main/kotlin/com/getcode/opencode/internal/network/api/intents/actions/ActionFeePayment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ internal class ActionFeePayment(
6262

6363
internal companion object {
6464
fun newInstance(
65-
index: Int,
6665
fee: Fee,
6766
source: AccountCluster,
6867
): ActionFeePayment {
6968
return ActionFeePayment(
70-
id = index,
69+
id = 0,
7170
signer = source.authority.keyPair,
7271
fee = fee,
7372
source = source,

services/opencode/src/main/kotlin/com/getcode/opencode/solana/intents/ActionGroup.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class ActionGroupBuilder {
1313

1414
// Build the ActionGroup instance
1515
fun build(): ActionGroup {
16-
return ActionGroup(actions)
16+
return ActionGroup(actions.numberActions())
1717
}
1818
}
1919

2020
// ActionGroup class
2121
class ActionGroup(actions: List<ActionType> = emptyList()) {
22-
var actions: List<ActionType> = actions
22+
var actions: List<ActionType> = actions.numberActions()
2323
set(value) {
2424
field = value.numberActions()
2525
}

0 commit comments

Comments
 (0)