Skip to content

Commit

Permalink
Merge pull request #3047 from planetarium/release/1.19.4
Browse files Browse the repository at this point in the history
Release 1.19.4
  • Loading branch information
OnedgeLee authored Nov 27, 2024
2 parents 51c8b73 + 0544f6f commit cb3d878
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Lib9c.Abstractions/Lib9c.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputPath>.bin</OutputPath>
<IntermediateOutputPath>.obj</IntermediateOutputPath>
<VersionPrefix>1.19.0</VersionPrefix>
<VersionPrefix>1.19.4</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Lib9c.MessagePack/Lib9c.MessagePack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Platforms>AnyCPU</Platforms>
<OutputPath>.bin</OutputPath>
<IntermediateOutputPath>.obj</IntermediateOutputPath>
<VersionPrefix>1.19.0</VersionPrefix>
<VersionPrefix>1.19.4</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Lib9c.Renderers/Lib9c.Renderers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<OutputPath>.bin</OutputPath>
<IntermediateOutputPath>.obj</IntermediateOutputPath>
<VersionPrefix>1.19.0</VersionPrefix>
<VersionPrefix>1.19.4</VersionPrefix>
<RootNamespace>Lib9c</RootNamespace>
</PropertyGroup>

Expand Down
31 changes: 18 additions & 13 deletions Lib9c/Action/Guild/Migration/MigrateDelegation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,28 @@ public override IWorld Execute(IActionContext context)

return repository.World;
}
catch (FailedLoadStateException)
catch (Exception e)
{
var pledgeAddress = ((Address)Target).GetPledgeAddress();

// Patron contract structure:
// [0] = PatronAddress
// [1] = IsApproved
// [2] = Mead amount to refill.
if (!world.TryGetLegacyState(pledgeAddress, out List list) || list.Count < 3 ||
list[0] is not Binary || list[0].ToAddress() != MeadConfig.PatronAddress ||
list[1] is not Bencodex.Types.Boolean approved || !approved)
if (e is FailedLoadStateException || e is NullReferenceException)
{
throw new GuildMigrationFailedException("Unexpected pledge structure.");
var pledgeAddress = ((Address)Target).GetPledgeAddress();

// Patron contract structure:
// [0] = PatronAddress
// [1] = IsApproved
// [2] = Mead amount to refill.
if (!world.TryGetLegacyState(pledgeAddress, out List list) || list.Count < 3 ||
list[0] is not Binary || list[0].ToAddress() != MeadConfig.PatronAddress ||
list[1] is not Bencodex.Types.Boolean approved || !approved)
{
throw new GuildMigrationFailedException("Unexpected pledge structure.");
}

repository.JoinGuild(planetariumGuildAddress, Target);
return repository.World;
}

repository.JoinGuild(planetariumGuildAddress, Target);
return repository.World;
throw;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Lib9c/Lib9c.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IntermediateOutputPath>.obj</IntermediateOutputPath>
<RootNamespace>Nekoyume</RootNamespace>
<LangVersion>9</LangVersion>
<VersionPrefix>1.19.0</VersionPrefix>
<VersionPrefix>1.19.4</VersionPrefix>
<EnableDynamicLoading>true</EnableDynamicLoading>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
Expand Down

0 comments on commit cb3d878

Please sign in to comment.