Skip to content

Commit 85e7dda

Browse files
authored
refactor(getShortcutDefinitions): define to return a promise (#277)
The runtime already resolves the value .getShortcutDefinitions returns.
1 parent ca2c549 commit 85e7dda

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/apps/gooddollar/shortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const client = createPublicClient({
99
})
1010

1111
const hook: ShortcutsHook = {
12-
getShortcutDefinitions(_network?: string, _address?: string) {
12+
async getShortcutDefinitions(_network?: string, _address?: string) {
1313
return [
1414
{
1515
id: 'claim-reward',

src/apps/ubeswap/shortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const client = createPublicClient({
99
})
1010

1111
const hook: ShortcutsHook = {
12-
getShortcutDefinitions(_network?: string, _address?: string) {
12+
async getShortcutDefinitions(_network?: string, _address?: string) {
1313
return [
1414
{
1515
id: 'claim-reward',

src/types/shortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export interface ShortcutsHook {
22
getShortcutDefinitions(
33
network?: string,
44
address?: string,
5-
): ShortcutDefinition[]
5+
): Promise<ShortcutDefinition[]>
66
}
77

88
export interface ShortcutDefinition {

0 commit comments

Comments
 (0)