Skip to content

Commit

Permalink
Update BitShares.js
Browse files Browse the repository at this point in the history
Removed invalid "private key" add account option for Bitshares
  • Loading branch information
grctest committed May 18, 2024
1 parent ea7e877 commit 5a69df6
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/lib/blockchains/BitShares.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,6 @@ export default class BitShares extends BlockchainAPI {
*/
getImportOptions() {
return [
{
type: "ImportKeys",
translate_key: "import_keys",
},
{
type: "bitshares/ImportBinFile",
translate_key: "import_bin",
Expand Down Expand Up @@ -1226,12 +1222,12 @@ export default class BitShares extends BlockchainAPI {
let parsedTransaction;
try {
parsedTransaction = await this._parseTransactionBuilder([
'signAndBroadcast',
"signAndBroadcast",
contents,
[]
[],
]);
} catch (error) {
console.log({error, location: "handleQR"});
console.log({ error, location: "handleQR" });
}

return parsedTransaction;
Expand Down Expand Up @@ -1274,7 +1270,7 @@ export default class BitShares extends BlockchainAPI {
* @param {Class||Object} incoming
* @returns {Class} TransactionBuilder
*/
async _parseTransactionBuilder(incoming) {
async _parseTransactionBuilder(incoming) {
if (incoming instanceof TransactionBuilder) {
return incoming;
} else if (
Expand Down Expand Up @@ -1315,7 +1311,7 @@ export default class BitShares extends BlockchainAPI {
try {
tr = await this._parseTransactionBuilder(operation);
} catch (error) {
console.log({error, location: "sign"});
console.log({ error, location: "sign" });
}
Promise.all([
tr.set_required_fees(),
Expand Down Expand Up @@ -1359,7 +1355,7 @@ export default class BitShares extends BlockchainAPI {
try {
tr = await this._parseTransactionBuilder(transaction);
} catch (error) {
console.log({error, location: "broadcast"});
console.log({ error, location: "broadcast" });
}

if (!tr) {
Expand Down Expand Up @@ -1536,7 +1532,9 @@ export default class BitShares extends BlockchainAPI {
*/
getExplorer(object, chain) {
if (object.accountName) {
return `https://blocksights.info/#/accounts/${object.accountName}${chain && chain === "BTS_TEST" ? `?network=testnet` : ``}`;
return `https://blocksights.info/#/accounts/${object.accountName}${
chain && chain === "BTS_TEST" ? `?network=testnet` : ``
}`;
} else if (object.opid) {
// 1.11.833380474
return "https://blocksights.info/#/operations/" + object.opid;
Expand Down

0 comments on commit 5a69df6

Please sign in to comment.