Skip to content

Commit 4a5b2f3

Browse files
authored
Merge pull request #762 from rocket-pool/issue-753-allow-whitespace-for-contract-names
Issue 753 - Allow whitespaces on the contract name
2 parents 5473d9d + f78c403 commit 4a5b2f3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

rocketpool-cli/pdao/one-time-spend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func proposeOneTimeSpend(c *cli.Context) error {
2424
// Get the invoice ID
2525
invoiceID := c.String("invoice-id")
2626
if invoiceID == "" {
27-
invoiceID = cliutils.Prompt("Please enter an invoice ID for this spend: (no spaces)", "^\\S+$", "Invalid ID")
27+
invoiceID = cliutils.Prompt("Please enter an invoice ID for this spend: ", "^\\s*\\S+\\s*$", "Invalid ID")
2828
}
2929

3030
// Get the recipient

rocketpool-cli/pdao/recurring-spend-update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func proposeRecurringSpendUpdate(c *cli.Context) error {
2424
// Get the contract name
2525
contractName := c.String("contract-name")
2626
if contractName == "" {
27-
contractName = cliutils.Prompt("Please enter a contract name for this recurring payment: (no spaces)", "^\\S+$", "Invalid ID")
27+
contractName = cliutils.Prompt("Please enter a contract name for this recurring payment: ", "^\\s*\\S+\\s*$", "Invalid ID")
2828
}
2929

3030
// Get the recipient

rocketpool-cli/pdao/recurring-spend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func proposeRecurringSpend(c *cli.Context) error {
2525
// Get the contract name
2626
contractName := c.String("contract-name")
2727
if contractName == "" {
28-
contractName = cliutils.Prompt("Please enter a contract name for this recurring payment:", "^\\S+$", "Invalid ID")
28+
contractName = cliutils.Prompt("Please enter a contract name for this recurring payment:", "^\\s*\\S+\\s*$", "Invalid ID")
2929
}
3030

3131
// Get the recipient

0 commit comments

Comments
 (0)