(1) The surety may refuse to satisfy the creditor as long as the principal debtor is entitled to avoid the legal transaction on which the obligation is based.
(2) The surety has the same authority as long as the creditor can obtain satisfaction by set-off against a claim of the principal debtor that is due.