If the Provider.js determines the voucher to be invalid in any way (amount is wrong, signature does not validate), then the Provider node should respond by doing this:
[x] log the error with ports.postLog("ERROR: ...")
[x] display the error for the user on the Provider browser (top red-ish box)
[x] abort the transfer
[x] Submit any payment vouchers received to the channel, then call Settle channel and set a 12 hour timer to Collect the channel later (same thing we do after a successful transfer to get the voucher funds)
The Client.js browser should do this:
[x] Receive the reply message that the voucher was invalid
[x] Log it also with ports.postLog
[x] Display the error for the user to see the message in the Client.js browser (top red box)
[x] abort the transfer
[x] clean up the partial transfer: delete the partial bytes received from the blockstore, delete the CID from "known cids" in the local storage
If the Provider.js determines the voucher to be invalid in any way (amount is wrong, signature does not validate), then the Provider node should respond by doing this:
ports.postLog("ERROR: ...")
The Client.js browser should do this:
ports.postLog