DocsUsing Nuntio
Approvals
Over a limit, a payment becomes a request. The owner approves or declines, then the approved payment is settled once.
When your policy holds a payment, you can ask the account's owner to allow it once. Asking is a separate transaction from paying. The contract cannot refuse a payment and record the request in the same call, because a refusal undoes everything in its transaction. So the request lives on the account's ApprovalQueue.
#The life of a request
#You ask
On the payment screen, press Ask for approval, or confirm a request Nini prepared. Your wallet files a request on the queue, with the gas paid for you. Filing moves no money.
The request records:
- the service, the amount and a note saying what it is for (the queue requires one, up to 200 bytes)
- the payee the registry gives for that service at this moment
- your policy's current generation, which a revocation would end
- a deadline one day after filing
Only an Active spender can file, and only for themselves. One payment can have one open request: asking about the same payment twice is refused until the first is finished.
#The owner decides
The owner sees the request on Approvals, with your policy beside it and the reason it needs them, such as "Over by $40". They press Approve $X or Decline $X.
- Approving moves no money. It allows one payment.
- Declining closes the request. No money moves.
#The approved payment is settled
Paying an approved request is a separate step: the owner presses Pay, which names the amount and the service. This calls
paySettledon the account. The amount, the spender and the payee were fixed when you filed. Nobody can change them at this step.The settlement still counts against your allowance and your payment count for the period, because the money left.
A request must be approved and paid within one day of filing. After that it reads Expired and cannot be paid. You can ask again. The owner can still decline an expired request to clear it from the list.
#Withdrawing a request
You can withdraw your own request while it is waiting or approved, and so can the owner. A withdrawn request can never be paid. Withdrawing moves no money and works even while the queue is paused, because it only takes permission away.
#What an approval waives, and what it never does
An approval lets a payment go past a budget. It never lets it go past a stop.
| An approval waives | An approval never waives |
|---|---|
| The cap per payment | A paused account, a paused queue, or an account not yet sealed |
| What is left of the allowance | A spender who is now Paused or Revoked |
| The approved services list | A revocation since the request was filed, even if the spender was added again |
| The number of payments per period | The policy's expiry |
| The request's one-day deadline, and its state | |
| The same payment already made, by either route | |
| A service suspended since filing | |
| A payee changed since filing |
If the service changed where it gets paid after the request was filed, settlement is refused and nothing moves. Ask again: the new request carries the new payee, and the owner reviews it before anything moves.
#Who decides
| Account | Who approves |
|---|---|
| A team | The team's owner, signing with their own wallet |
| Nuntio's main account | Nuntio |
| The testnet Sandbox | The Nuntio team, when it can. Requests nobody decides expire after a day |
The queue reads its decider from the account's current owner() at every call. If the account changes hands, approval authority moves with it in the same transaction.