mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-05 03:56:26 +03:00
parent
a9dc2d63d2
commit
3e666850dc
@ -292,7 +292,7 @@ object Ref {
|
||||
sealed abstract class PackageRef extends Product with Serializable
|
||||
object PackageRef {
|
||||
final case class Name(name: PackageName) extends PackageRef {
|
||||
override def toString: String = "n#" + name
|
||||
override def toString: String = "#" + name
|
||||
}
|
||||
|
||||
final case class Id(id: PackageId) extends PackageRef {
|
||||
@ -300,8 +300,8 @@ object Ref {
|
||||
}
|
||||
|
||||
def fromString(s: String): Either[String, PackageRef] =
|
||||
if (s.startsWith("n#"))
|
||||
PackageName.fromString(s.drop(2)).map(Name)
|
||||
if (s.startsWith("#"))
|
||||
PackageName.fromString(s.drop(1)).map(Name)
|
||||
else
|
||||
PackageId.fromString(s).map(Id)
|
||||
|
||||
|
@ -77,7 +77,7 @@ class GrpcLedgerClient(
|
||||
.getPackageName(compiledPackages, identifier.packageId)
|
||||
.getOrElse(throw new IllegalArgumentException("Couldn't get package name"))
|
||||
if (explicitPackageId || !enableContractUpgrading) converted
|
||||
else converted.copy(packageId = "n#" + pkgName)
|
||||
else converted.copy(packageId = "#" + pkgName)
|
||||
}
|
||||
|
||||
// TODO[SW]: Currently do not support querying with explicit package id, interface for this yet to be determined
|
||||
|
Loading…
Reference in New Issue
Block a user