Search in sources :

Example 1 with HapiGetTokenInfo

use of com.hedera.services.bdd.spec.queries.token.HapiGetTokenInfo in project hedera-services by hashgraph.

the class HapiTokenFeeScheduleUpdate method lookupInfo.

static TokenInfo lookupInfo(HapiApiSpec spec, String token, Logger scopedLog, boolean loggingOff) throws Throwable {
    HapiGetTokenInfo subOp = getTokenInfo(token).noLogging();
    Optional<Throwable> error = subOp.execFor(spec);
    if (error.isPresent()) {
        if (!loggingOff) {
            scopedLog.warn("Unable to look up current info for " + HapiPropertySource.asTokenString(spec.registry().getTokenID(token)), error.get());
        }
        throw error.get();
    }
    return subOp.getResponse().getTokenGetInfo().getTokenInfo();
}
Also used : HapiGetTokenInfo(com.hedera.services.bdd.spec.queries.token.HapiGetTokenInfo)

Aggregations

HapiGetTokenInfo (com.hedera.services.bdd.spec.queries.token.HapiGetTokenInfo)1