@ecency/wallets 1.4.24 → 1.4.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node/index.cjs
CHANGED
|
@@ -1220,13 +1220,16 @@ function getHivePowerDelegatingsQueryOptions(username) {
|
|
|
1220
1220
|
async function transferHive(payload) {
|
|
1221
1221
|
const parsedAsset = parseAsset(payload.amount);
|
|
1222
1222
|
const token = parsedAsset.symbol;
|
|
1223
|
+
const precision = token === "VESTS" /* VESTS */ ? 6 : 3;
|
|
1224
|
+
const formattedAmount = parsedAsset.amount.toFixed(precision);
|
|
1225
|
+
const amountWithSymbol = `${formattedAmount} ${token}`;
|
|
1223
1226
|
if (payload.type === "key" && "key" in payload) {
|
|
1224
1227
|
const { key, type, ...params } = payload;
|
|
1225
1228
|
return sdk.CONFIG.hiveClient.broadcast.transfer(
|
|
1226
1229
|
{
|
|
1227
1230
|
from: params.from,
|
|
1228
1231
|
to: params.to,
|
|
1229
|
-
amount:
|
|
1232
|
+
amount: amountWithSymbol,
|
|
1230
1233
|
memo: params.memo
|
|
1231
1234
|
},
|
|
1232
1235
|
key
|
|
@@ -1236,7 +1239,7 @@ async function transferHive(payload) {
|
|
|
1236
1239
|
(resolve, reject) => window.hive_keychain?.requestTransfer(
|
|
1237
1240
|
payload.from,
|
|
1238
1241
|
payload.to,
|
|
1239
|
-
|
|
1242
|
+
formattedAmount,
|
|
1240
1243
|
payload.memo,
|
|
1241
1244
|
token,
|
|
1242
1245
|
(resp) => {
|
|
@@ -1256,7 +1259,7 @@ async function transferHive(payload) {
|
|
|
1256
1259
|
{
|
|
1257
1260
|
from: payload.from,
|
|
1258
1261
|
to: payload.to,
|
|
1259
|
-
amount:
|
|
1262
|
+
amount: amountWithSymbol,
|
|
1260
1263
|
memo: payload.memo
|
|
1261
1264
|
}
|
|
1262
1265
|
],
|