Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions contracts/dashboard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ impl DashboardContract {
authorized.require_auth();

let key = creator_dashboard_key(&creator);
let mut dashboard: CreatorDashboard = env
.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
let mut dashboard: CreatorDashboard =
env.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
dashboard.invoice_count = dashboard
.invoice_count
.checked_add(1)
Expand All @@ -75,17 +75,17 @@ impl DashboardContract {
authorized.require_auth();

let key = creator_dashboard_key(&creator);
let mut dashboard: CreatorDashboard = env
.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
let mut dashboard: CreatorDashboard =
env.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
dashboard.released_count = dashboard
.released_count
.checked_add(1)
Expand All @@ -106,17 +106,17 @@ impl DashboardContract {
authorized.require_auth();

let key = creator_dashboard_key(&creator);
let mut dashboard: CreatorDashboard = env
.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
let mut dashboard: CreatorDashboard =
env.storage()
.persistent()
.get(&key)
.unwrap_or(CreatorDashboard {
invoice_count: 0,
total_volume: 0,
released_count: 0,
refunded_count: 0,
released_volume: 0,
});
dashboard.refunded_count = dashboard
.refunded_count
.checked_add(1)
Expand Down
1 change: 1 addition & 0 deletions contracts/dashboard/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(test)]
#![allow(clippy::all)]

use super::*;
use soroban_sdk::{testutils::Address as _, Address, Env};
Expand Down
32 changes: 16 additions & 16 deletions contracts/split/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ use soroban_sdk::contracterror;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u32)]
pub enum ContractError {
NotAuthorized = 1,
InvoiceNotFound = 2,
DeadlinePassed = 3,
AlreadyFunded = 4,
InvalidAmount = 5,
InvoiceFrozen = 6,
InvalidStatus = 7,
PayerNotAllowed = 8,
NotAuthorized = 1,
InvoiceNotFound = 2,
DeadlinePassed = 3,
AlreadyFunded = 4,
InvalidAmount = 5,
InvoiceFrozen = 6,
InvalidStatus = 7,
PayerNotAllowed = 8,
FundingInsufficient = 9,
OracleCallFailed = 10,
NotArbiter = 11,
NotDisputed = 12,
AlreadyExecuted = 13,
TimelockPending = 14,
ContractPaused = 15,
InvalidRecipients = 16,
OracleCallFailed = 10,
NotArbiter = 11,
NotDisputed = 12,
AlreadyExecuted = 13,
TimelockPending = 14,
ContractPaused = 15,
InvalidRecipients = 16,
PrerequisiteNotMet = 17,
BatchLimitExceeded = 18,
/// Issue #327: Funds are still time-locked and cannot be released yet.
FundsLockedUntil = 20,
FundsLockedUntil = 20,
/// Issue #330: Recipient has already been paid on this invoice.
RecipientAlreadyPaid = 19,
}
Loading