public Amount(AmountValue value, Currency currency = null, AccountId issuer = null) { Currency = currency ?? Currency.Xrp; Issuer = issuer ?? (Currency.IsNative ? AccountId.Zero : AccountId.Neutral); Value = value; }
public static Amount FromParser(BinaryParser parser, int?hint = null) { var value = AmountValue.FromParser(parser); if (!value.IsIou) { return(new Amount(value)); } var curr = Currency.FromParser(parser); var issuer = AccountId.FromParser(parser); return(new Amount(value, curr, issuer)); }
public Amount(string v = "0", Currency c = null, AccountId i = null) : this(AmountValue.FromString(v, c == null || c.IsNative), c, i) { }