here-wallet / js-sdk Goto Github PK
View Code? Open in Web Editor NEWHERE Wallet JS SDK
HERE Wallet JS SDK
Hi.
I tried to make a transaction using here wallet, but this problem in the title keeps popping up.
I wonder if it has anything to do with the sdk. I don't directly use this sdk, but via near-wallet-selector
. After logging in, I perform the call as below:
import { providers } from 'near-api-js';
async call(method: string, args = {}, deposit = "0") {
if (this.get_account_id() == null) {
console.error("please sign in.");
return;
}
const gas = '30000000000000';
const outcome = await this.wallet.signAndSendTransaction({
signerId: this.account_id,
receiverId: this.contract_id,
actions: [{
type: 'FunctionCall',
params: {
methodName: method,
args,
gas,
deposit
},
}]
});
return providers.getTransactionLastResult(outcome);
}
and an example function that cause the error looks like this (it's located in a service file in Angular):
this.walletService.call('activate_receipt', {}, utils.format.parseNearAmount("0.1") ?? "0")
(Note: the above function isn't the only one causing the error. Calling other functions also cause the decimal error).
I wonder what was causing the error. In essence, running the same code in MyNearWallet is successful; yet, it doesn't pass with Here Wallet.
The code is run on testnet. Wallet is connected to testnet as well.
Though one notice one thing: despite wallerhere.testnet
(the connected account) having positive non-zero balance, it displays the account balance as $0. Does that affect it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.