mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-25 16:04:17 +01:00
58 lines
1.1 KiB
Mathematica
58 lines
1.1 KiB
Mathematica
|
//
|
||
|
// MenuElementsEmitter.m
|
||
|
// BlueWallet
|
||
|
//
|
||
|
|
||
|
#import "MenuElementsEmitter.h"
|
||
|
|
||
|
static MenuElementsEmitter *sharedInstance;
|
||
|
|
||
|
@implementation MenuElementsEmitter
|
||
|
|
||
|
RCT_EXPORT_MODULE();
|
||
|
|
||
|
+ (BOOL)requiresMainQueueSetup {
|
||
|
return YES;
|
||
|
}
|
||
|
|
||
|
+ (instancetype)sharedInstance {
|
||
|
if (!sharedInstance) {
|
||
|
sharedInstance = [[self alloc] init];
|
||
|
}
|
||
|
return sharedInstance;
|
||
|
}
|
||
|
|
||
|
- (instancetype)init {
|
||
|
self = [super init];
|
||
|
if (self) {
|
||
|
sharedInstance = self;
|
||
|
}
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (NSArray<NSString *> *)supportedEvents {
|
||
|
return @[
|
||
|
@"openSettings",
|
||
|
@"addWalletMenuAction",
|
||
|
@"importWalletMenuAction",
|
||
|
@"reloadTransactionsMenuAction"
|
||
|
];
|
||
|
}
|
||
|
|
||
|
- (void)openSettings {
|
||
|
[self sendEventWithName:@"openSettings" body:nil];
|
||
|
}
|
||
|
|
||
|
- (void)addWalletMenuAction {
|
||
|
[self sendEventWithName:@"addWalletMenuAction" body:nil];
|
||
|
}
|
||
|
|
||
|
- (void)importWalletMenuAction {
|
||
|
[self sendEventWithName:@"importWalletMenuAction" body:nil];
|
||
|
}
|
||
|
|
||
|
- (void)reloadTransactionsMenuAction {
|
||
|
[self sendEventWithName:@"reloadTransactionsMenuAction" body:nil];
|
||
|
}
|
||
|
|
||
|
@end
|