Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Set proxy admin on first create
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcarpanelli authored and spalladino committed Jul 18, 2019
1 parent 06cb6c4 commit ba8e3bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/models/network/NetworkController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ export default class NetworkController {
address: instance.address,
version: semanticVersionToString(packageVersion),
implementation: implementationAddress,
admin: admin || this.networkFile.proxyAdminAddress,
admin: admin || this.networkFile.proxyAdminAddress || (await this.project.getAdminAddress()),
kind,
});
return instance;
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/test/scripts/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ contract('create script', function([_, owner, otherAdmin]) {
proxyImplementation.should.equalIgnoreCase(minimal);
}

if(!minimal) {
proxyInfo.admin.should.not.be.undefined;
}

return proxyInfo;
};

Expand Down

0 comments on commit ba8e3bb

Please sign in to comment.