Cleanup kredits service
This commit is contained in:
@@ -4,7 +4,12 @@ import ethers from 'npm:ethers';
|
||||
export default function(dependentKey, converterMethod) {
|
||||
return computed(dependentKey, {
|
||||
get () {
|
||||
return this.get(dependentKey)[converterMethod]();
|
||||
let value = this.get(dependentKey);
|
||||
if (value && ethers.utils.isBigNumber(value)) {
|
||||
return value[converterMethod]();
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
set (key, value) {
|
||||
value = ethers.utils.bigNumberify(value);
|
||||
|
||||
Reference in New Issue
Block a user