func (w *SCWallet) UpdateInput(trans interfaces.ITransaction, index int, address interfaces.IAddress, amount uint64) error { we, adr, err := w.getWalletEntry([]byte(constants.W_RCD_ADDRESS_HASH), address) if err != nil { return err } in, err := trans.GetInput(index) if err != nil { return err } trans.GetRCDs()[index] = we.GetRCD() // The RCD must match the (possibly) new input in.SetAddress(adr) in.SetAmount(amount) return nil }