MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / updateChannelBalance

Function updateChannelBalance

web/src/components/table/ChannelsTable.js:1515–1529  ·  view source on GitHub ↗
(record)

Source from the content-addressed store, hash-verified

1513 };
1514
1515 const updateChannelBalance = async (record) => {
1516 const res = await API.get(`/api/channel/update_balance/${record.id}/`);
1517 const { success, message, balance } = res.data;
1518 if (success) {
1519 updateChannelProperty(record.id, (channel) => {
1520 channel.balance = balance;
1521 channel.balance_updated_time = Date.now() / 1000;
1522 });
1523 showInfo(
1524 t('通道 ${name} 余额更新成功!').replace('${name}', record.name),
1525 );
1526 } else {
1527 showError(message);
1528 }
1529 };
1530
1531 const batchDeleteChannels = async () => {
1532 if (selectedChannels.length === 0) {

Callers 1

ChannelsTable.jsFile · 0.70

Calls 3

showInfoFunction · 0.90
showErrorFunction · 0.90
tFunction · 0.70

Tested by

no test coverage detected