Bug fix
This commit is contained in:
@@ -113,17 +113,16 @@ const model: Model = {
|
||||
address,
|
||||
balance,
|
||||
} = (yield select((state: any) => state.draw)) as DrawModelState;
|
||||
if (!coin || !balance) return;
|
||||
if (!coin) return message.warn(formatMessage({ id: 'draw.coin' }));
|
||||
if (!address) return message.warn(formatMessage({ id: 'draw.targetPrompt' }));
|
||||
const inputAmount = new BigNumber(amount || 0);
|
||||
if (inputAmount.lt(1000)) return message.warn(formatMessage({ id: 'draw.amountLt' }));
|
||||
if (inputAmount.gt(balance)) return message.warn(formatMessage({ id: 'draw.amountGt' }));
|
||||
if (inputAmount.gt(balance || 0)) return message.warn(formatMessage({ id: 'draw.amountGt' }));
|
||||
yield put({
|
||||
type: 'onUpdateState',
|
||||
confirmVisible: true,
|
||||
confirmLoading: false,
|
||||
password: '',
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
*draw(_, { put, select, call }) {
|
||||
|
||||
Reference in New Issue
Block a user