isValidPaymentIntents method
Implementation
@override
void isValidPaymentIntents(PaymentIntent intent) {
try {
double.tryParse(intent.amount);
} catch (_) {
throw StateError(
'invalid amount value. Should be double expressed as String (${intent.toJson()})',
);
}
final chainId = intent.token.network.chainId;
if (!CaipValidator.isValidCaip2(chainId)) {
throw StateError(
'chainId should conform to "CAIP-2" format (${intent.toJson()})',
);
}
}