Skip to content

Commit a23e8ac

Browse files
authored
Use ma_address instead of the address to check the allowance (#283)
1 parent a713ecc commit a23e8ac

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

fplus-lib/src/core/mod.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,12 @@ impl LDNApplication {
10241024
let contract_address = db_allocator
10251025
.tooling
10261026
.filter(|tooling| tooling.contains("smart_contract_allocator"))
1027-
.and_then(|_| db_allocator.address.clone());
1027+
.and_then(|_| {
1028+
db_allocator
1029+
.ma_address
1030+
.clone()
1031+
.or_else(|| db_allocator.address.clone())
1032+
});
10281033

10291034
let multisig_address = db_allocator.multisig_address.ok_or(LDNError::Load(
10301035
"Failed to get multisig address.".to_string(),
@@ -1200,7 +1205,12 @@ impl LDNApplication {
12001205
let contract_address = db_allocator
12011206
.tooling
12021207
.filter(|tooling| tooling.contains("smart_contract_allocator"))
1203-
.and_then(|_| db_allocator.address.clone());
1208+
.and_then(|_| {
1209+
db_allocator
1210+
.ma_address
1211+
.clone()
1212+
.or_else(|| db_allocator.address.clone())
1213+
});
12041214
Self::is_allowance_sufficient(
12051215
&multisig_address,
12061216
&new_allocation_amount,

0 commit comments

Comments
 (0)