@@ -120,20 +120,12 @@ async function initializeWallet(runtime: IAgentRuntime, networkId: string) {
120
120
wallet = await Wallet . create ( { networkId } ) ;
121
121
122
122
// Export wallet data directly
123
- const walletData : WalletData = wallet . export ( ) ; // Assuming Wallet.export() provides { seed, walletId }
124
- const walletAddress = wallet . getDefaultAddress ( ) ;
125
-
126
- if ( runtime . character . settings . secrets ) {
127
- runtime . character . settings . secrets . COINBASE_GENERATED_WALLET_HEX_SEED =
128
- walletData . seed ;
129
- runtime . character . settings . secrets . COINBASE_GENERATED_WALLET_ID =
130
- walletData . walletId ;
131
- } else {
132
- elizaLogger . warn (
133
- "Unable to store wallet details: Secrets object is unavailable."
134
- ) ;
135
- }
136
-
123
+ const walletData : WalletData = wallet . export ( ) ;
124
+ const walletAddress = await wallet . getDefaultAddress ( ) ;
125
+ runtime . character . settings . secrets . COINBASE_GENERATED_WALLET_HEX_SEED =
126
+ walletData . seed ;
127
+ runtime . character . settings . secrets . COINBASE_GENERATED_WALLET_ID =
128
+ walletData . walletId ;
137
129
// Logging wallet creation
138
130
elizaLogger . log ( "Created and stored new wallet:" , walletAddress ) ;
139
131
} else {
@@ -327,11 +319,11 @@ export const sendMassPayoutAction: Action = {
327
319
const { receivingAddresses, transferAmount, assetId, network } =
328
320
transferDetails . object as TransferContent ;
329
321
330
- const allowedNetworks = [ "base" , "sol" , "eth" , "arb" , "pol" ] ;
322
+ const allowedNetworks = Object . values ( Coinbase . networks ) ;
331
323
332
324
if (
333
325
! network ||
334
- ! allowedNetworks . includes ( network . toLowerCase ( ) ) ||
326
+ ! allowedNetworks . includes ( network . toLowerCase ( ) as any ) ||
335
327
! receivingAddresses ?. length ||
336
328
transferAmount <= 0 ||
337
329
! assetId
0 commit comments