We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc55d17 commit 91a07d3Copy full SHA for 91a07d3
paysplit/sources/split.move
@@ -118,6 +118,11 @@ module PaySplit::split {
118
public fun view_balance(admin_addr: address, owner: address): u64 acquires Splitter {
119
let s = borrow_global<Splitter>(admin_addr);
120
let (found, idx) = find_balance_index(&s.balances, owner);
121
- if (!found) 0 else (*vector::borrow(&s.balances, idx)).amount
+ if (!found) {
122
+ 0
123
+ } else {
124
+ let b = vector::borrow(&s.balances, idx);
125
+ b.amount
126
+ }
127
}
128
0 commit comments