GetMainAccount fetches the main account/keypair object of developer.
(db *gorp.DbMap, developerID int64)
| 174 | |
| 175 | // GetMainAccount fetches the main account/keypair object of developer. |
| 176 | func GetMainAccount(db *gorp.DbMap, developerID int64) (p *DeveloperPrivateKey, err error) { |
| 177 | d, err := GetDeveloper(db, developerID) |
| 178 | if err != nil { |
| 179 | return |
| 180 | } |
| 181 | |
| 182 | p, err = GetAccountByID(db, developerID, d.MainAccount) |
| 183 | if err != nil { |
| 184 | p = nil |
| 185 | return |
| 186 | } |
| 187 | |
| 188 | return |
| 189 | } |
no test coverage detected