Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
substrate-tip-bot
Commits
ad95a903
Unverified
Commit
ad95a903
authored
Jul 30, 2022
by
Shawn Tabrizi
Browse files
main fixes
parent
a4d5b71f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/tip.ts
View file @
ad95a903
...
...
@@ -58,8 +58,8 @@ export function parseContributorAccount(
}
const
network
=
networkInput
in
validNetworks
?
validNetworks
[
networkInput
as
keyof
typeof
validNetworks
]
networkInput
.
toLowerCase
()
in
validNetworks
?
validNetworks
[
networkInput
.
toLowerCase
()
as
keyof
typeof
validNetworks
]
:
undefined
if
(
!
network
)
{
throw
new
Error
(
...
...
@@ -111,7 +111,7 @@ export async function tipUser(
/* TODO before submitting, check tip does not already exist via a storage query.
TODO potentially prevent duplicates by also checking for reasons with the other sizes. */
const
unsub
=
await
api
.
tx
.
tips
.
reportAwesome
(
reason
,
botTipAccount
.
address
)
.
reportAwesome
(
reason
,
contributor
.
account
)
.
signAndSend
(
botTipAccount
,
(
result
:
SubmittableResult
)
=>
{
bot
.
log
(
`Current status is
${
result
.
status
.
toString
()}
`
)
if
(
result
.
status
.
isInBlock
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment