Skip to content

Commit

Permalink
Flag needed for new external integration tests / debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 authored Jul 7, 2024
1 parent 0e99573 commit 6d89d15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/payment-driver/erc20/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use ethereum_types::H160;
use ethereum_types::U256;
use num_bigint::BigInt;
use std::collections::HashMap;
use std::env;
use std::str::FromStr;
use std::sync::Arc;
use std::time::Instant;
Expand Down Expand Up @@ -376,6 +377,13 @@ impl Erc20Driver {
caller: String,
msg: ValidateAllocation,
) -> Result<ValidateAllocationResult, GenericError> {
if env::var("YAGNA_DEV_SKIP_ALLOCATION_VALIDATION")
.map(|v| v == "1" || v == "true")
.unwrap_or(false)
{
return Ok(ValidateAllocationResult::Valid);
}

if msg.deposit.is_some() {
Err(GenericError::new(
"validate_allocation_internal called with not empty deposit",
Expand Down

0 comments on commit 6d89d15

Please sign in to comment.