Skip to content
Snippets Groups Projects
Commit 665eb384 authored by Bernardo Cardoso's avatar Bernardo Cardoso
Browse files

Fix promises

parent b794d466
Branches
Tags
No related merge requests found
......@@ -83,7 +83,7 @@ function getTransfers(blockEvents) {
async function getReceipt(api, address, sender) {
console.log('Starting finalized blocks listener...');
return new Promise((reject, resolve) => {
return new Promise((resolve, reject) => {
api.rpc.chain.subscribeFinalizedHeads(async (header) => {
// Get block number
const blockNumber = header.number.toNumber();
......
......@@ -20,7 +20,7 @@ async function connect() {
}
async function sendAndWait(extrinsic, final) {
return new Promise((reject, resolve) => {
return new Promise((resolve, reject) => {
// Sign and send the extrinsic using our wallet
extrinsic.send(({ status }) => {
if (status.isInBlock) {
......
......@@ -19,7 +19,7 @@ async function connect() {
}
async function sendAndWait(extrinsic, final) {
return new Promise((reject, resolve) => {
return new Promise((resolve, reject) => {
// Sign and send the extrinsic using our wallet
extrinsic.send(({ status }) => {
if (status.isInBlock) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment