Converts the data string to a Balance instance.
when (forageApiResponse) {
is ForageApiResponse.Success -> {
val balance = forageApiResponse.toBalance() as EbtBalance
if (balance is EbtBalance) {
// Unpack balance.snap, balance.cash
}
}
}
Return
A Balance instance.