Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/commands/contract/call_function/as_transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,11 @@ impl PrepaidGas {
CustomType::new("Enter gas for function call:")
.with_starting_input("100 TeraGas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas"
.to_string(),
),
))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ impl PrepaidGas {
CustomType::new("Enter gas for function call:")
.with_starting_input("100 TeraGas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas"
.to_string(),
),
))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ impl PrepaidGas {
CustomType::new("Enter gas for function call:")
.with_starting_input("100 TeraGas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas"
.to_string(),
),
))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ impl PrepaidGas {
CustomType::new("Enter gas for function call:")
.with_starting_input("100 TeraGas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas"
.to_string(),
),
))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ impl PrepaidGas {
CustomType::new("Enter gas for function call:")
.with_starting_input("100 TeraGas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas"
.to_string(),
),
))
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/transaction_signature_options/sign_with_mpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ impl PrepaidGas {
"Sign call to MPC contract requires minimum of 15 TeraGas".to_string(),
),
))
} else if gas > &near_gas::NearGas::from_tgas(300) {
} else if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas".to_string(),
),
))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ impl PrepaidGas {
)
.with_starting_input("10 Tgas")
.with_validator(move |gas: &crate::common::NearGas| {
if gas > &near_gas::NearGas::from_tgas(300) {
if gas > &near_gas::NearGas::from_tgas(1000) {
Ok(inquire::validator::Validation::Invalid(
inquire::validator::ErrorMessage::Custom(
"You need to enter a value of no more than 300 TeraGas".to_string(),
"You need to enter a value of no more than 1000 TeraGas".to_string(),
),
))
} else {
Expand Down
Loading