let contract = Invoice {
origin: from.clone(),
to: to.clone(),
amount,
status: false,
id: 0,
msg: msg.clone(),
};
let mut invoice_vec: Vec<Invoice<T::AccountId, T::AccountId, BalanceOf<T>>> = Vec::new();
invoice_vec.push(contract);
// Save in storage the sender and the invoices
<InvoiceSender<T>>::insert(from.clone(), &invoice_vec);
Above I do have a struct and I put it into an array and then I store it as a value.
It is very difficult for me to mutate the value in storage. Let's assume I would like to change the status from false to true if the id is equal to 17
if(id == 17){
<InvoiceSender<T>>::try_mutate(from.clone(), .....
}
Can you help me complete the above line of code?