Created
August 17, 2019 21:59
-
-
Save brenden-t-r/1977781a9d51527f79b886eb9a944f97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VerifySettlement(private val otherSession: FlowSession) : FlowLogic<Unit>() { | |
// .. omitting .. | |
@Suspendable | |
override fun call() { | |
// .. omitting .. | |
// 4. Handle different settlement methods. | |
val verifyResult = when (settlementMethod) { | |
is XrpSettlement -> verifyXrpSettlement(obligation, lastPayment as XrpPayment<TokenType>) | |
is SwiftSettlement -> verifySwiftSettlement(lastPayment as SwiftPayment) | |
/* INCLUDE OUR SETTLEMENT RAIL HERE! */ | |
is CustomSettlementMethod -> verifyCustomPaymentRailSettlement(..) | |
else -> throw IllegalStateException("Invalid settlement method $settlementMethod.") | |
} | |
// .. omitting .. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment