Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
foundation
scripts
Commits
665eb384
Commit
665eb384
authored
Sep 3, 2022
by
Bernardo Cardoso
Browse files
Options
Downloads
Patches
Plain Diff
Fix promises
parent
b794d466
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
get-transfers/index.js
+1
-1
1 addition, 1 deletion
get-transfers/index.js
ledger/index.js
+1
-1
1 addition, 1 deletion
ledger/index.js
transactions/index.js
+1
-1
1 addition, 1 deletion
transactions/index.js
with
3 additions
and
3 deletions
get-transfers/index.js
+
1
−
1
View file @
665eb384
...
...
@@ -83,7 +83,7 @@ function getTransfers(blockEvents) {
async
function
getReceipt
(
api
,
address
,
sender
)
{
console
.
log
(
'
Starting finalized blocks listener...
'
);
return
new
Promise
((
re
ject
,
resolve
)
=>
{
return
new
Promise
((
re
solve
,
reject
)
=>
{
api
.
rpc
.
chain
.
subscribeFinalizedHeads
(
async
(
header
)
=>
{
// Get block number
const
blockNumber
=
header
.
number
.
toNumber
();
...
...
This diff is collapsed.
Click to expand it.
ledger/index.js
+
1
−
1
View file @
665eb384
...
...
@@ -20,7 +20,7 @@ async function connect() {
}
async
function
sendAndWait
(
extrinsic
,
final
)
{
return
new
Promise
((
re
ject
,
resolve
)
=>
{
return
new
Promise
((
re
solve
,
reject
)
=>
{
// Sign and send the extrinsic using our wallet
extrinsic
.
send
(({
status
})
=>
{
if
(
status
.
isInBlock
)
{
...
...
This diff is collapsed.
Click to expand it.
transactions/index.js
+
1
−
1
View file @
665eb384
...
...
@@ -19,7 +19,7 @@ async function connect() {
}
async
function
sendAndWait
(
extrinsic
,
final
)
{
return
new
Promise
((
re
ject
,
resolve
)
=>
{
return
new
Promise
((
re
solve
,
reject
)
=>
{
// Sign and send the extrinsic using our wallet
extrinsic
.
send
(({
status
})
=>
{
if
(
status
.
isInBlock
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment