Skip to content

Commit fcd0422

Browse files
feat(chaincmd): add legacy send support to faucet (ignite#829)
1 parent 5db8991 commit fcd0422

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

starport/pkg/chaincmd/chaincmd.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type ChainCmd struct {
6363
cliCmd string
6464
cliHome string
6565
nodeAddress string
66+
legacySend bool
6667

6768
isAutoChainIDDetectionEnabled bool
6869

@@ -164,6 +165,14 @@ func WithLaunchpadCLIHome(cliHome string) Option {
164165
}
165166
}
166167

168+
// WithLegacySendCommand will make the command use the legacy tx send syntax from launchpad
169+
// on stargate chains. e.g.: CosmWasm
170+
func WithLegacySendCommand() Option {
171+
return func(c *ChainCmd) {
172+
c.legacySend = true
173+
}
174+
}
175+
167176
// StartCommand returns the command to start the daemon of the chain
168177
func (c ChainCmd) StartCommand(options ...string) step.Option {
169178
command := append([]string{
@@ -418,7 +427,7 @@ func (c ChainCmd) BankSendCommand(fromAddress, toAddress, amount string) step.Op
418427
commandTx,
419428
}
420429

421-
if c.sdkVersion.Major().Is(cosmosver.Stargate) {
430+
if c.sdkVersion.Major().Is(cosmosver.Stargate) && !c.legacySend {
422431
command = append(command,
423432
"bank",
424433
)

0 commit comments

Comments
 (0)