This repository was archived by the owner on Apr 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
packages/fasset-bots-core/src/fasset Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,10 +46,15 @@ export class OwnerAddressPair {
4646 async acceptWorkAddressAssignment ( agentOwnerRegistry : AgentOwnerRegistryInstance ) {
4747 const currentWorkAddress = await agentOwnerRegistry . getWorkAddress ( this . managementAddress ) ;
4848 if ( currentWorkAddress === this . workAddress ) return true ;
49- const pendingWorkAddress = await agentOwnerRegistry . getPendingWorkAddress ( this . managementAddress ) ;
50- if ( pendingWorkAddress !== this . workAddress ) return false ;
51- await agentOwnerRegistry . acceptWorkAddressAssignment ( this . managementAddress , { from : this . workAddress } ) ;
52- return true ;
49+ try {
50+ const pendingWorkAddress = await agentOwnerRegistry . getPendingWorkAddress ( this . managementAddress ) ;
51+ if ( pendingWorkAddress !== this . workAddress ) return false ;
52+ await agentOwnerRegistry . acceptWorkAddressAssignment ( this . managementAddress , { from : this . workAddress } ) ;
53+ return true ;
54+ } catch ( error ) {
55+ logger . error ( "Invalid call to getPendingWorkAddress/acceptWorkAddressAssignment, maybe contracts not updated?" , error ) ;
56+ return false ;
57+ }
5358 }
5459}
5560
You can’t perform that action at this time.
0 commit comments